-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update selectedcontent in selectedness setting #11890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56241,24 +56241,45 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> { | |
| <var>element</var>, is to run the following steps:</p> | ||
|
|
||
| <ol> | ||
| <li><p>If <var>element</var>'s <code data-x="attr-select-multiple">multiple</code> attribute is | ||
| absent, and <var>element</var>'s <span data-x="concept-select-size">display size</span> is 1, | ||
| and no <code>option</code> elements in the <var>element</var>'s <span | ||
| data-x="concept-select-option-list">list of options</span> have their <span | ||
| data-x="concept-option-selectedness">selectedness</span> set to true, then set the <span | ||
| data-x="concept-option-selectedness">selectedness</span> of the first <code>option</code> | ||
| element in the <span data-x="concept-select-option-list">list of options</span> in | ||
| <span>tree order</span> that is not <span data-x="concept-option-disabled">disabled</span>, | ||
| if any, to true, and return.</p></li> | ||
|
|
||
| <li><p>If <var>element</var>'s <code data-x="attr-select-multiple">multiple</code> attribute is | ||
| absent, and two or more <code>option</code> elements in <var>element</var>'s <span | ||
| data-x="concept-select-option-list">list of options</span> have their <span | ||
| data-x="concept-option-selectedness">selectedness</span> set to true, then set the <span | ||
| data-x="concept-option-selectedness">selectedness</span> of all but the last <code>option</code> | ||
| element with its <span data-x="concept-option-selectedness">selectedness</span> set to true in | ||
| the <span data-x="concept-select-option-list">list of options</span> in <span>tree order</span> | ||
| to false.</p></li> | ||
| <li><p>Let <var>updateSelectedcontent</var> be false.</p></li> | ||
|
|
||
| <li> | ||
| <p>If <var>element</var>'s <code data-x="attr-select-multiple">multiple</code> attribute is | ||
| absent, and <var>element</var>'s <span data-x="concept-select-size">display size</span> is 1, | ||
| and no <code>option</code> elements in the <var>element</var>'s <span | ||
| data-x="concept-select-option-list">list of options</span> have their <span | ||
| data-x="concept-option-selectedness">selectedness</span> set to true, then:</p> | ||
|
josepharhar marked this conversation as resolved.
Outdated
|
||
|
|
||
| <ol> | ||
| <li><p>Set the <span | ||
| data-x="concept-option-selectedness">selectedness</span> of the first <code>option</code> | ||
| element in the <span data-x="concept-select-option-list">list of options</span> in | ||
| <span>tree order</span> that is not <span data-x="concept-option-disabled">disabled</span>, | ||
| if any, to true.</p></li> | ||
|
|
||
| <li><p>Set <var>updateSelectedcontent</var> to true.</p></li> | ||
| </ol> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Otherwise, if <var>element</var>'s <code data-x="attr-select-multiple">multiple</code> | ||
| attribute is absent, and two or more <code>option</code> elements in <var>element</var>'s <span | ||
|
josepharhar marked this conversation as resolved.
Outdated
|
||
| data-x="concept-select-option-list">list of options</span> have their <span | ||
| data-x="concept-option-selectedness">selectedness</span> set to true, then:</p> | ||
|
josepharhar marked this conversation as resolved.
Outdated
|
||
|
|
||
| <ol> | ||
| <li><p>Set the <span data-x="concept-option-selectedness">selectedness</span> of all but the | ||
| last <code>option</code> element with its <span | ||
| data-x="concept-option-selectedness">selectedness</span> set to true in the <span | ||
| data-x="concept-select-option-list">list of options</span> in <span>tree order</span> to | ||
| false.</p></li> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reads a bit ambiguous to me. Maybe:
Perhaps it's okay as-is though. @zcorpan @domfarolino @noamr thoughts?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like your proposed wording, but do we even need to specify the ones with selectedness to true? How about: This should be the same, but is more concise, and keeps the tree order condition, which I think is nice.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not the same. If we have true, true, false we would go to false, false, false with your wording. Whereas we want false, true, false.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I find it hard to read. How about something like:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's now also #12083 which is quite a bit clearer for this particular problem, but I'm not sure how it all relates anymore.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I am going to make it a clearer algorithm. I think we can proceed in a couple different ways:
Which would you prefer @annevk? |
||
|
|
||
| <li><p>Set <var>updateSelectedcontent</var> to true.</p></li> | ||
| </ol> | ||
| </li> | ||
|
|
||
| <li><p>If <var>updateSelectedcontent</var> is true, then run <span>update a <code>select</code>'s | ||
| <code>selectedcontent</code></span> given <var>element</var>.</p></li> | ||
| </ol> | ||
| </div> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.