-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
topic: selectThe <select> elementThe <select> element
Description
What is the issue with the HTML Standard?
In the selectedcontent HTML element post-connection steps, the algorithm currently reads:
The selectedcontent HTML element post-connection steps, given selectedcontent, are:
- Let nearestSelectAncestor be null.
- Let ancestor be selectedcontent’s parent.
- Set selectedcontent’s disabled state to false.
- For each of selectedcontent’s ancestors, in reverse tree order:
- If ancestor is a select element:
- If nearestSelectAncestor is null, then set nearestSelectAncestor to select.
- Otherwise, set selectedcontent's disabled state to true.
- If ancestor is an option element or a selectedcontent element, then set selectedcontent's disabled state to true.
Step 2 is a dead step: the ancestor variable is never used because step 4 walks the ancestor chain directly. Suggest removing step 2 to eliminate the unused step.
Spec section: https://html.spec.whatwg.org/multipage/form-elements.html#the-selectedcontent-element
Metadata
Metadata
Assignees
Labels
topic: selectThe <select> elementThe <select> element