Bug 254655

Summary: event.relatedTarget is null in blur event handler when button is clicked
Product: WebKit Reporter: qwant94
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, cdumez, karlcow, qwant94, rniwa, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=109176
Attachments:
Description Flags
html file for demonstrate behavior none

Description qwant94 2023-03-29 02:22:59 PDT
Created attachment 465657 [details]
html file for demonstrate behavior

event.relatedTarget doesn't set in correctly when blur event occures. Example of that behavior included in attachment index.html file.

tested on browserstack 12.1 - 16.3 and in real 16.4
Comment 1 qwant94 2023-03-29 02:30:01 PDT
In Chrome 111 and Firefox 110 event.relatedTarget is not null (HTML Button Element in case of attachment)
Comment 2 Radar WebKit Bug Importer 2023-04-05 02:23:16 PDT
<rdar://problem/107650876>
Comment 3 Ryosuke Niwa 2023-05-02 16:06:55 PDT
This is because button is not mouse focusable by default in Safari.