Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Show the picker" steps never dismisses the picker upon node removal #10743

Open
domfarolino opened this issue Nov 5, 2024 · 3 comments
Open
Assignees
Labels
clarification Standard could be clearer topic: forms topic: select The <select> element

Comments

@domfarolino
Copy link
Member

What is the issue with the HTML Standard?

In https://html.spec.whatwg.org/multipage/input.html#show-the-picker%2C-if-applicable, UI gets shown to the user representing the picker for either input or select elements. If those elements get removed from the DOM while the picker is shown (except for type=file apparently), the picker UI gets dismissed immediately in Chrome+Safari, but not Firefox (click the input within 2 seconds of loading the following data: URL):

data:text/html,<input%20id=input%20type=color><script>setTimeout(()%20=>%20{input.remove()},%202000)</script>

Aligning on Chrome/Safari behavior here makes sense to me I think, so we should consider patching up that algorithm to hook into DOM and respond to the removal appropriately by dismissing the picker UI. The solution to this will likely come in the form of semi-handwavy text inside the existing algorithm (although something more procedural could be considered maybe).

Context: I ran into this while working on whatwg/dom#1307.

@annevk
Copy link
Member

annevk commented Nov 6, 2024

While not strictly speaking observable to websites (although maybe it is through :open?), it probably makes sense to state something about expectations here.

cc @josepharhar @pxlcoder @nt1m @emilio

@domfarolino
Copy link
Member Author

Does :open exist? I can't find anything about that pseudoselector on MDN.

@annevk
Copy link
Member

annevk commented Nov 6, 2024

Hopefully soon: #10126

@annevk annevk added the topic: select The <select> element label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: forms topic: select The <select> element
Development

No branches or pull requests

2 participants