Remove focus if supportsFocus state is changed
https://bugs.webkit.org/show_bug.cgi?id=119713
Summary Remove focus if supportsFocus state is changed
Ryosuke Niwa
Reported 2013-08-12 19:19:24 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/bdf4e305bcf5a7ab899f06a2cc697acaa9ab8116 Changes of *[tabindex], a[href], button[disabled], etc. affect focusable state, but these changes don't always trigger layout. We need to ask focus check explicitly.
Attachments
Ahmad Saleem
Comment 1 2022-08-09 16:48:25 PDT
I took test cases from Chrome Commit: Test Case 1 - https://jsfiddle.net/ojL52nsq/show *** Safari 15.6 on macOS 12.6 *** AIL document.activeElement should be javascript:. Was [object HTMLBodyElement]. Remove href. FAIL No blur event PASS successfullyParsed is true TEST COMPLETE link >>>> then Safari HANGS!! *** Firefox Nightly 105 *** PASS document.activeElement is target Remove href. FAIL No blur event PASS successfullyParsed is true TEST COMPLETE PASS blur event was disaptched. PASS successfullyParsed is true TEST COMPLETE *** Chrome Canary 106 *** PASS document.activeElement is target Remove href. PASS blur event was disaptched. PASS successfullyParsed is true TEST COMPLETE FAIL No blur event PASS successfullyParsed is true TEST COMPLETE ______________ Test Case 2 - https://jsfiddle.net/r3x84k6y/show *** Safari 15.6 on macOS 12.5 *** FAIL document.activeElement should be [object HTMLDivElement]. Was [object HTMLBodyElement]. Remove tabindex. FAIL No blur event PASS successfullyParsed is true TEST COMPLETE div >>>> then Safari HANGS!! *** Chrome Canary 106 *** PASS document.activeElement is target Remove tabindex. PASS blur event was disaptched. PASS successfullyParsed is true TEST COMPLETE FAIL No blur event PASS successfullyParsed is true TEST COMPLETE *** Firefox Nightly 105 *** PASS document.activeElement is target Remove tabindex. FAIL No blur event PASS successfullyParsed is true TEST COMPLETE PASS blur event was disaptched. PASS successfullyParsed is true TEST COMPLETE ____________ Test Case 3 - https://jsfiddle.net/ob561dma/show *** Safari 15.6 on macOS 12.5 *** FAIL document.activeElement should be [object HTMLButtonElement]. Was [object HTMLBodyElement]. Clicking a button makes the button disabled. FAIL No blur event. PASS successfullyParsed is true TEST COMPLETE *** Chrome Canary 106 *** FAIL document.activeElement should be [object HTMLButtonElement]. Was [object HTMLBodyElement]. Clicking a button makes the button disabled. FAIL No blur event. PASS successfullyParsed is true TEST COMPLETE *** Firefox Nightly 105 *** FAIL document.activeElement should be [object HTMLButtonElement]. Was [object HTMLBodyElement]. Clicking a button makes the button disabled. FAIL No blur event. PASS successfullyParsed is true TEST COMPLETE __________________ I just wanted to share updated test results and it shows that Safari do differ from other browsers in some cases. Thanks!
Radar WebKit Bug Importer
Comment 2 2022-08-10 10:56:09 PDT
Note You need to log in before you can comment on or make changes to this bug.