Bug 239655

Summary: Focus event fired unnecessarily on mobile devices after interacting with a select box
Product: WebKit Reporter: Andrew <andrew.kirwin>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, andrew.kirwin, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   

Description Andrew 2022-04-22 07:58:51 PDT
Originally raise here https://bugs.chromium.org/p/chromium/issues/detail?id=1316314

Reproduction: https://jsfiddle.net/amk221/z3fdtj2y/

When a select box is interacted with using a mouse on a desktop, and that select box is inside a focusable element, then focus stays within that element. This is correct and works fine.

The same scenario but run on a mobile device (where select boxes are often rendered differently), causes focus to leave the _container_ element (which it shouldn't do because focus is still on the select box which is a child of the container).

I believe this is in correct behaviour and that the two scenarios should match each other.
Comment 1 Radar WebKit Bug Importer 2022-04-29 07:59:12 PDT
<rdar://problem/92523984>