WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
140596
UI Events: Focus event sequence incorrect
https://bugs.webkit.org/show_bug.cgi?id=140596
Summary
UI Events: Focus event sequence incorrect
Rodney Rehm
Reported
2015-01-18 11:46:02 PST
Created
attachment 244864
[details]
focus-event-sequence.html # Steps to reproduce the problem: 1. register event listeners for focusout, blur, focusin, focus 2. observe sequence of dispatched events upon shifting focus Live test-case:
http://medialize.github.io/ally.js/tests/browser-bugs/focus-event-order.html
# What is the expected behavior? The sequence per DOM Level 3 [1] should be: focusout, focusin, blur, focus [1]
https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#events-focusevent-event-order
# What went wrong? sequence is blur, focusout, focus, focusing With the currently provided sequence the focusout and focusin events cannot be safely used to alter focus before it was given. The only "benefit" the current implementation brings with focusin over focus is that the former bubbles, the latter does not. Gecko doesn't support focusin/focusout at all. WebKit suffers the same bug. IE11 dispatches focus events asynchronously thereby accidentally getting the sequence right, IE12 Win10 Tec Preview fixed the ansynchronous-bug and thereby messed up the sequence as well. Chromium bug for reference:
https://code.google.com/p/chromium/issues/detail?id=449857
Attachments
focus-event-sequence.html
(1.88 KB, text/html)
2015-01-18 11:46 PST
,
Rodney Rehm
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Chris Rebert
Comment 1
2016-05-26 13:17:32 PDT
Another testcase:
http://w3c-test.org/uievents/order-of-events/focus-events/focus-manual.html
Ahmad Saleem
Comment 2
2022-08-06 15:15:36 PDT
We pass following WPT tests -
https://wpt.fyi/results/uievents/order-of-events/focus-events/focus-automated-blink-webkit.html?label=master&label=experimental&aligned&view=subtest&q=focus-event
Which are in relation to "order of event" similar to
Comment 01
. I am going to mark this as "RESOLVED CONFIGURATION CHANGED", since we are passing related WPT tests. Please reopen, if I am wrong. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug