NEW258610
Clicking a link inside a contenteditable=false element sets the target of the focusin event to the contenteditable
https://bugs.webkit.org/show_bug.cgi?id=258610
Summary Clicking a link inside a contenteditable=false element sets the target of the...
Brian Birtles
Reported 2023-06-27 23:58:43 PDT
Created attachment 466839 [details] Test case The attached test case looks like the following: ``` <div id=div contenteditable=false tabindex=0> <a href="#yer">Yer</a> </div> <script> div.addEventListener('focusin', (evt) => { console.log(evt.target); }); </script> ``` Clicking the link in Firefox or Chrome triggers a `focusin` event with the target set to the <a> element. In Safari 16.5 and TP, the `target` is set to the `<div>`. Furthermore, without the `tabindex=0`, no focusin event is dispatched in Safari, although it is in Firefox and Chrome.
Attachments
Test case (218 bytes, text/html)
2023-06-27 23:58 PDT, Brian Birtles
no flags
Karl Dubost
Comment 1 2023-06-29 00:37:03 PDT
Hey Brian, thanks for the report. Confirmed on latest nightly, canary, stp versions of the browsers.
Radar WebKit Bug Importer
Comment 2 2023-07-04 23:59:16 PDT
Note You need to log in before you can comment on or make changes to this bug.