Skip to content

Commit

Permalink
Clarify the value comparison in input.value's setter
Browse files Browse the repository at this point in the history
This is a follow-up to whatwg#2437, which introduced the value comparison and
its impact on selection. See
web-platform-tests/wpt#5147 (comment).
  • Loading branch information
domenic authored and Alice Boxhall committed Jan 7, 2019
1 parent f1019cd commit d704c52
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -48658,10 +48658,11 @@ You cannot submit this form when the field is incorrect.</samp></pre>
<li><p>Invoke the <span>value sanitization algorithm</span>, if the element's <code
data-x="attr-input-type">type</code> attribute's current state defines one.</p></li>

<li><p>If the new value is different from <var>oldValue</var> and the element has a text entry
cursor position, move the text entry cursor position to the end of the text control,
unselecting any selected text and <span data-x="set the selection direction">resetting the
selection direction</span> to "<code data-x="">none</code>".</p></li>
<li><p>If the element's <span data-x="concept-fe-value">value</span> (after applying the
<span>value sanitization algorithm</span>) is different from <var>oldValue</var>, and the
element has a text entry cursor position, move the text entry cursor position to the end of the
text control, unselecting any selected text and <span data-x="set the selection
direction">resetting the selection direction</span> to "<code data-x="">none</code>".</p></li>
</ol>
</dd>

Expand Down

0 comments on commit d704c52

Please sign in to comment.