[Webkit-unassigned] [Bug 225265] New: visibilitychange fires in a bad order

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 30 20:15:05 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=225265

            Bug ID: 225265
           Summary: visibilitychange fires in a bad order
           Product: WebKit
           Version: Safari 14
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rsnow at adobe.com

we're trying to use visibility change to determine if we should show a focus ring or not when a user is coming back to a page
unfortunately in Safari the order of events is not what we expected
when coming back to a tab, the focus events run first, then visibilitychange
this is opposite to what happens when the user leaves the tab where blur runs, then visibilitychange runs

I think that running visibilitychange last when leaving and first when arriving makes the most sense.
https://jsfiddle.net/snowystinger/fhxjm2pz/2/

On another note, I also noticed that focus is fired twice.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210501/ccfc2c7e/attachment.htm>


More information about the webkit-unassigned mailing list