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>
<rdar://problem/47290452>
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>