Skip to content

Conversation

@josepharhar
Copy link
Contributor

@josepharhar josepharhar commented Oct 14, 2025

This PR changes the "option element nearest ancestor select" algorithm to incorporate cases where the option element is nested inside of option, hr, optgroup, or datalist elements to match the option list algorithm.

Fixes #11788

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


/form-elements.html ( diff )

This PR changes the "option element nearest ancestor select" algorithm
to incorporate cases where the option element is nested inside of
option, hr, optgroup, or datalist elements to match the option list
algorithm.

Fixes whatwg#11788
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I guess this is sufficient if we're storing a pointer on option. I hope we can continue to avoid requiring that particular implementation choice however.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but CI is unhappy.

@annevk annevk merged commit 0524c68 into whatwg:main Oct 17, 2025
2 checks passed
2186006988c-netizen

This comment was marked as spam.

@whatwg whatwg deleted a comment from 2186006988c-netizen Oct 18, 2025
@whatwg whatwg deleted a comment from 2186006988c-netizen Oct 18, 2025
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.

"option element nearest ancestor select" is wrong

3 participants