New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of actions for labeled control should be focus then click #3702
Conversation
EWS run on previous version of this PR (hash 4e3f931) |
EWS run on previous version of this PR (hash f19d996) |
Order of actions for labeled control should be focus then click https://bugs.webkit.org/show_bug.cgi?id=119372 Merge - https://chromium.googlesource.com/chromium/blink/+/237028d603d5fe587ec282f6d2cf3b5a31c01902 Order of actions for labeled control should be focus then click. When we click on a checkbox or a radio button, event order is: - mousedown - focus, triggered by mousedown - mouseup - change, triggered by the following click - click That is to say, we focus on it first and then click it. Click on an associated label should have same behavior. It is align with behavior of Blink / Chromium and Gecko (Firefox). * Source/WebCore/html/HTMLLabelElement.cpp: (HTMLLabelElement::defaultEventHandler) - Move dispatchSimulatedClick after "updateLayourIgnorePendingStyleSheet". * LayoutTests/fast/forms/label/label-event-order.html: Added new test * LayoutTests/fast/forms/label/label-event-order-expectation.txt: Added test expectations
Looks like the newly added test is failing? |
It is failing newly added test and also one which is already available (label-becomes-visible-while-clicking-on-label.html), when I changed already available test into JSFiddle - https://jsfiddle.net/r3mjfzey/ - Safari behaves differently compared to other browsers (e.g. Clicking on "Click Me", will make field active and caret will show to start typing and it does in Safari. While in other browsers, Chrome Canary 107 and Firefox Nightly 106, it does just focus but not have caret in it to start typing). I am not sure, which browser is working correctly. Similar, newly added test (https://jsfiddle.net/1jzfho0n/), fails on first sub-test in Safari while other browsers make it pass. I checked and test (label-becomes-visible-while-clicking-on-label.html) is Webkit specific and it is not in Chromium GitHub. |
@rniwa - this commit added - https://commits.webkit.org/136596@main (Currently failing test). |
Unfortunately, I am getting weird error on my GitHub fork and I have delete it and add again. I am closing this PR right now and will look into once I fix my Git errors. Thanks! |
bb2ac69