Bug 234009

Summary: Add showPicker() to <input> elements
Product: WebKit Reporter: beaufort.francois
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: akeerthi, daytonlowell, eoconnor, ntim, webkit-bug-importer, zsun
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

beaufort.francois
Reported 2021-12-08 08:09:56 PST
The showPicker() method is a new addition to HTMLInputElement which addresses a very common request from web developers: programmatically showing a picker for controls like date etc. <input id="dateInput" type="date"> <button onclick="dateInput.showPicker()">Show the date picker</button> WHATWG Spec PR: https://github.com/whatwg/html/pull/7319
Attachments
Radar WebKit Bug Importer
Comment 1 2021-12-09 13:14:07 PST
zsun
Comment 2 2022-03-24 02:31:14 PDT
*** This bug has been marked as a duplicate of bug 237192 ***
zsun
Comment 3 2022-03-24 02:52:53 PDT
bug 237192 probably only covers part of this feature.
Sam Sneddon [:gsnedders]
Comment 4 2022-06-06 07:00:02 PDT
(In reply to zsun from comment #3) > bug 237192 probably only covers part of this feature. What part did it cover, and what part didn't it cover? It's not clear from either bug what has been implemented.
zsun
Comment 5 2022-06-06 09:08:43 PDT
(In reply to Sam Sneddon [:gsnedders] from comment #4) > (In reply to zsun from comment #3) > > bug 237192 probably only covers part of this feature. > > What part did it cover, and what part didn't it cover? It's not clear from > either bug what has been implemented. The work on showPicker were motivated by three WPT tests show-picker-disabled-readonly.html, show-picker-user-gesture.html and show-picker-cross-origin-iframe.html. Just checked wpt.fyi, apart from show-picker-disabled-readonly.html, the other two tests pass for Safari now. For show-picker-disabled-readonly.html, basically it should throw for input that is readonly/disable. We have this part function in place. However, readonly should only applies to text only input types + <textarea>. In WebKit we need to follow specs and restrict the readonly attribute to the listed types. This is the part we need to do (see bug https://bugs.webkit.org/show_bug.cgi?id=240343).
Tim Nguyen (:ntim)
Comment 6 2022-06-08 03:21:13 PDT
I think it's reasonable to make this bug a duplicate and track remaining work in subsequent bugs. *** This bug has been marked as a duplicate of bug 237192 ***
Tim Nguyen (:ntim)
Comment 7 2022-06-08 03:22:29 PDT
I've put followups as a dependency of bug 237192
Note You need to log in before you can comment on or make changes to this bug.