Skip to content

Build list of selectedcontent elements to clear#11891

Closed
josepharhar wants to merge 5 commits into
whatwg:mainfrom
josepharhar:selectedcontentiterating
Closed

Build list of selectedcontent elements to clear#11891
josepharhar wants to merge 5 commits into
whatwg:mainfrom
josepharhar:selectedcontentiterating

Conversation

@josepharhar
Copy link
Copy Markdown
Contributor

@josepharhar josepharhar commented Nov 6, 2025

This PR improves the "clear a select's non-primary selectedcontent elements" algorithm by making it create a list of selectedcontent elements to modify separately from modifying them in order to prevent the list of elements to change while iterating.

Fixes #11880

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


/form-elements.html ( diff )

This PR improves the "clear a select's non-primary selectedcontent
elements" algorithm by making it create a list of selectedcontent
elements to modify separately from modifying them in order to prevent
the list of elements to change while iterating.

Fixes whatwg#11880
Comment thread source Outdated
Comment thread source Outdated
@annevk
Copy link
Copy Markdown
Member

annevk commented Jan 13, 2026

@josepharhar it doesn't seem like the tests in https://chromium-review.googlesource.com/c/chromium/src/+/7128135 have made their way to WPT. Any reason this appears to be stalled?

@annevk annevk added the topic: select The <select> element label Jan 13, 2026
Copy link
Copy Markdown
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 modulo nit, but the test needs sorting out.

Comment thread source Outdated
@josepharhar
Copy link
Copy Markdown
Contributor Author

@josepharhar it doesn't seem like the tests in https://chromium-review.googlesource.com/c/chromium/src/+/7128135 have made their way to WPT. Any reason this appears to be stalled?

Sorry, I will get it reviewed very soon

@josepharhar
Copy link
Copy Markdown
Contributor Author

The WPT changes have been merged

@josepharhar
Copy link
Copy Markdown
Contributor Author

This change is being included in #12263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: select The <select> element

Development

Successfully merging this pull request may close these issues.

Clearing non-primary selectedcontent elements is broken

2 participants