Bug 250739 - clicking the blank area in the date input can't trigger focusin event
Summary: clicking the blank area in the date input can't trigger focusin event
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 16
Hardware: PC macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-17 16:59 PST by 2471314
Modified: 2023-01-24 17:00 PST (History)
4 users (show)

See Also:


Attachments
the focus event log (2.46 MB, video/mp4)
2023-01-17 16:59 PST, 2471314
no flags Details
debug trace (1.27 MB, image/png)
2023-01-19 23:50 PST, 2471314
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>