| Summary: | Clicking a link inside a contenteditable=false element sets the target of the focusin event to the contenteditable | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brian Birtles <brian> | ||||
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | cdumez, karlcow, mike, rniwa, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Hey Brian, thanks for the report. Confirmed on latest nightly, canary, stp versions of the browsers. |
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.