Performance issue due to focus state in Safari
See original GitHub issueNot so much of an issue that needs fixing but it might be useful to mention in the docs:
While implementing a11y-dialog
in a website I ran into a strange issue due to Safari’s user agent stylesheet. This is a fullscreen dialog, the dialog content spans the whole screen. As soon as the dialog opens focus is set on the dialog container. Safari applies user agent styles for the focus which then hinder the performance. For instance resizing the browser becomes very choppy. Also when you’ve applied animations to the dialog these don’t run and skip to the end immediately as Safari is struggling. The solution I’ve used to resolve this is to set .container:focus { outline: none}
.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Tab focus not working in Safari? - SeanMcP.com
As it turns out, Safari does not enable tab highlighting by default. To turn it on: Go to “Preferences”
Read more >Safari Web Content high CPU usage - Apple Community
Hi everyone! Safari become very lag when I open a new tab or pages, and when I checked Activity Monitor, the one that...
Read more >MacOS Safari many inputs, slow focus and typing is sluggish
In Safari however there are problems: clicking (focussing) on an input takes sometimes a few seconds.
Read more >iOS 16: How to Limit Browsing to a Specific Safari Tab Group ...
1. Launch the Settings app on your iPhone, then tap Focus. 2. Select the Focus mode that you want to associate a Tab...
Read more >New WebKit Features in Safari 15.4
WebKit also added support for the global autofocus attribute allowing developers to indicate which element should be the one in focus when the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately I haven’t had the time to adjust the demo, I’m fine with closing the issue. Thanks for your time in any case 🙏🏻
I’ll update the example with some animation (this is when I first noticed the issues with Safari) as it might demonstrate the issue a bit clearer.