Bug 250739

Summary: clicking the blank area in the date input can't trigger focusin event
Product: WebKit Reporter: 2471314
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, cdumez, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: PC   
OS: macOS 13   
Attachments:
Description Flags
the focus event log
none
debug trace none

Description 2471314 2023-01-17 16:59:21 PST
Created attachment 464530 [details]
the focus event log

Here is a demo:
https://codesandbox.io/s/date-input-rd1p57

Observe the console log.

Clicking the date/month/year fields can trigger focus/focusin events.
But Clicking the blank area only triggers focus event, can't trigger focusin event.
Comment 1 2471314 2023-01-19 23:50:56 PST
Created attachment 464572 [details]
debug trace

After this line:
m_focusedElement->dispatchFocusEvent(oldFocusedElement.copyRef(), options);

m_focusedElement is changed to DateTimeMonthFieldElement
Comment 2 Radar WebKit Bug Importer 2023-01-24 17:00:22 PST
<rdar://problem/104626389>