Skip to content

Conversation

@josepharhar
Copy link
Contributor

@josepharhar josepharhar commented Dec 11, 2025

This PR prevents light dismiss from running immediately after clicking the select element's invoker button, which would close the base appearance picker as soon as the user releases the mouse since the picker is opened on mousedown.

(See WHATWG Working Mode: Changes for more details.)


/popover.html ( diff )

This PR prevents light dismiss from running immediately after clicking
the select element's invoker button, which would close the base
appearance picker as soon as the user releases the mouse since the
picker is opened on mousedown.
@sb3nder
Copy link

sb3nder commented Dec 12, 2025

I wonder if instead of this, would it be possible to do something like the following?

in nearest inclusive target popover:

If currentNode is a select that is being rendered as a drop-down box with base appearance, and select popover visibility state is showing, then return select popover.

@josepharhar
Copy link
Contributor Author

josepharhar commented Dec 12, 2025

I wonder if instead of this, would it be possible to do something like the following?

in nearest inclusive target popover:

If currentNode is a select that is being rendered as a drop-down box with base appearance, and select popover visibility state is showing, then return select popover.

Thanks, that's much better! I put it in the popover target element algorithm instead and I'm implementing it in chromium here, which seems to work well. How does it look?

@sb3nder
Copy link

sb3nder commented Dec 13, 2025

looks good 👍

ajperel pushed a commit to chromium/chromium that referenced this pull request Dec 18, 2025
This patch prevents customizable select's popover from being light
dismissed when the user clicks on the select to invoke the popover in a
less hacky way.

Spec PR: whatwg/html#12008

Change-Id: I1488ccdf3addf0df69ca252fcbb56da433bf3f6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6912976
Reviewed-by: Joey Arhar <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1560264}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants