| Summary: | [macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
| Component: | Forms | Assignee: | Ryosuke Niwa <rniwa> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, simon.fraser, thorton, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 366148 [details]
Fixes the bug
Comment on attachment 366148 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=366148&action=review > Source/WebKit/ChangeLog:16 > + to dismiss the popup over from JS seems to be flaky. "popup" or "pop over" or "popover" but not "popup over" IMO (In reply to Tim Horton from comment #3) > Comment on attachment 366148 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=366148&action=review > > > Source/WebKit/ChangeLog:16 > > + to dismiss the popup over from JS seems to be flaky. > > "popup" or "pop over" or "popover" but not "popup over" IMO Oops, I forgot to remove this comment. We do have tests. Committed r243601: <https://trac.webkit.org/changeset/243601> |
In the following example, when the select element loses focus while the popup is shown, clicking on the select element again does not open the popup. <!DOCTYPE html> <html> <select> <option>foo</option> <option>bar</option> </select> <script> const select = document.querySelector("select"); select.addEventListener("focus", () => setTimeout(() => select.blur(), 0), { once: true }); </script> </html>