Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -59168,8 +59168,6 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
<ol>
<li><p>Let <var>nearestSelectAncestor</var> be null.</p></li>

<li><p>Let <var>ancestor</var> be <var>selectedcontent</var>'s <span>parent</span>.</p></li>

<li><p>Set <var>selectedcontent</var>'s <span data-x="selectedcontent-disabled">disabled</span>
state to false.</p></li>

Expand All @@ -59187,12 +59185,15 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s

<li><p>Otherwise, set <var>selectedcontent</var>'s <span
data-x="selectedcontent-disabled">disabled</span> state to true.</p></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move the below break into this "otherwise" condition. If we always break when the ancestor is a select element, then we can't detect the nested select elements case.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is also what the chromium implementation does

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I think this is lacking test coverage.

Copy link
Member Author

Choose a reason for hiding this comment

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

Although if we end up finding ourselves in a nested situation, why do we still run update select's selectedcontents on the innermost select?


<li><p><span>Break</span>.</p></li>
</ol>
</li>

<li><p>If <var>ancestor</var> is an <code>option</code> element or a
<code>selectedcontent</code> element, then set <var>selectedcontent</var>'s <span
data-x="selectedcontent-disabled">disabled</span> state to true.</p></li>
data-x="selectedcontent-disabled">disabled</span> state to true and
<span>break</span>.</p></li>
</ol>
</li>

Expand Down