Skip to content
Draft
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
63 changes: 55 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -49831,6 +49831,11 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
to the value of the <code data-x="attr-input-value">value</code> content attribute, if there is
one, or the empty string otherwise, and then run the current <span>value sanitization
algorithm</span>, if one is defined.</span></p>

<p>If the element <span data-x="supports plain text ranges">supports plain text ranges</span> and this operation changes its
<span data-x="concept-fe-value">value</span>, then the user agent must run the
<span>plain text range full replacement steps</span> with the element, the old value's
<span>length</span>, and the new value's <span>length</span>.</p>
</div>

<div w-nodev>
Expand Down Expand Up @@ -49879,6 +49884,11 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
current state defines one.</p>
</div>

<p>If the element <span data-x="supports plain text ranges">supports plain text ranges</span> and its
<span data-x="concept-fe-value">value</span> has changed as a result of this algorithm, then the
user agent must run the <span>plain text range full replacement steps</span> with the element, the
old value's <span>length</span>, and the new value's <span>length</span>.</p>

<p>Each <code>input</code> element can be <i data-x="concept-fe-mutable">mutable</i>. Except where
otherwise specified, an <code>input</code> element is always <i
data-x="concept-fe-mutable">mutable</i>. Similarly, except where otherwise specified, the user
Expand Down Expand Up @@ -50087,6 +50097,10 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
element's <span data-x="concept-textarea/input-cursor">text entry cursor position</span> to the
beginning of the text control, and <span data-x="set the selection direction">set its selection
direction</span> to "<code data-x="">none</code>".</p></li>

<li><p>If <var>previouslySelectable</var> is true and <var>nowSelectable</var> is false, then for
each <code>PlainTextRange</code> object whose host is this element, set that object's host to
null and set both of its start and end offsets to 0.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -50156,7 +50170,6 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
</div>



<h5>States of the <code data-x="attr-input-type">type</code> attribute</h5>


Expand Down Expand Up @@ -54799,6 +54812,12 @@ 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 element's <span data-x="concept-fe-value">value</span> is different from
<var>oldValue</var>, and the element <span data-x="supports plain text ranges">supports plain text ranges</span>, then run the
<span>plain text range full replacement steps</span> with the element, <var>oldValue</var>'s
<span>length</span>, and the current <span data-x="concept-fe-value">value</span>'s
<span>length</span>.</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 <span data-x="concept-textarea/input-cursor">text entry cursor position</span>,
Expand Down Expand Up @@ -57529,6 +57548,9 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
interaction before queuing the task; for example, a user agent could wait for the user to have not
hit a key for 100ms, so as to only fire the event when the user pauses, instead of continuously
for each keystroke.</p>
<p>Before queuing that task, if the element <span data-x="supports plain text ranges">supports plain text ranges</span>, then run the
<span>plain text range value mutation steps</span> with the element, the edit's <var>offset</var>,
<var>deleted length</var>, and <var>inserted length</var> to describe the change.</p>
</div>
<!-- same text is present in the <input> section -->

Expand All @@ -57549,16 +57571,25 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
<p>The <span>children changed steps</span> for <code>textarea</code> elements must, if the
element's <span data-x="concept-fe-dirty">dirty value flag</span> is false, set the element's
<span data-x="concept-textarea-raw-value">raw value</span> to its <span>child text
content</span>.</p>
content</span>. If this changes the element's <span data-x="concept-textarea-raw-value">raw value</span>,
and the element <span data-x="supports plain text ranges">supports plain text ranges</span>, then the user agent must run the
<span>plain text range full replacement steps</span> with the element, the length of the previous
<span data-x="concept-fe-api-value">API value</span>, and the length of the new
<span data-x="concept-fe-api-value">API value</span>.</p>
</div>

<div algorithm>
<p>The <span data-x="concept-form-reset-control">reset algorithm</span> for <code>textarea</code>
elements is to set the <span>user validity</span> to false, the <span
data-x="concept-fe-dirty">dirty value flag</span> back to false, and the <span
data-x="concept-textarea-raw-value">raw value</span> to its <span>child text
content</span>.</p>
</div>
content</span>. If this changes the element's
<span data-x="concept-fe-api-value">API value</span>, and the element
<span data-x="supports plain text ranges">supports plain text ranges</span>, then the user agent must run the
<span>plain text range full replacement steps</span> with the element, the length of the previous
<span data-x="concept-fe-api-value">API value</span>, and the length of the new
<span data-x="concept-fe-api-value">API value</span>.</p>
/div>

<div algorithm>
<p>When a <code>textarea</code> element is popped off the <span>stack of open elements</span> of
Expand Down Expand Up @@ -57814,7 +57845,12 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {

<div algorithm>
<p>The <code data-x="dom-textarea-defaultValue">defaultValue</code> attribute's setter must
<span>string replace all</span> with the given value within this element.</p>
<span>string replace all</span> with the given value within this element.
If this changes the element's <span data-x="concept-textarea-raw-value">raw value</span>, and the
element <span data-x="supports plain text ranges">supports plain text ranges</span>, then the user
agent must run the <span>plain text range full replacement steps</span> with the element, the
length of the previous <span data-x="concept-fe-api-value">API value</span>, and the length of the
new <span data-x="concept-fe-api-value">API value</span>.</p>
</div>

<div algorithm>
Expand All @@ -57830,8 +57866,13 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
<li><p>Set this element's <span data-x="concept-textarea-raw-value">raw value</span> to the new
value.</p></li>

<li><p>Set this element's <span data-x="concept-fe-dirty">dirty value flag</span> to
true.</p></li>
<li><p>Set this element's <span data-x="concept-fe-dirty">dirty value flag</span> to true.</p></li>

<li><p>If this changes the element's <span data-x="concept-fe-api-value">API value</span>, and the
element <span data-x="supports plain text ranges">supports plain text ranges</span>, then the user
agent must run the <span>plain text range full replacement steps</span> with this element, the
<span>length</span> of <var>oldAPIValue</var>, and the <span>length</span> of the element's new
<span data-x="concept-fe-api-value">API value</span>.</p></li>

<li><p>If the new <span data-x="concept-fe-api-value">API value</span> is different from
<var>oldAPIValue</var>, then move the <span data-x="concept-textarea/input-cursor">text entry
Expand Down Expand Up @@ -62137,7 +62178,13 @@ MIT Room 32-G524
<li><p>Let <var>new length</var> be the <span>length</span> of the value of the first
argument.</p></li>

<li><p>Let <var>new end</var> be the sum of <var>start</var> and <var>new length</var>.</p></li>
<li><p>Let <var>new end</var> be the sum of <var>start</var> and <var>new length</var>.</p></li>

<li><p>Let <var>deleted count</var> be max(0, <var>end</var> minus <var>start</var>).</p></li>

<li><p>If this element <a>supports plain text ranges</a>,
then run the <a href="#plain-text-range-adjustment">plain text range value mutation algorithm</a>
with this element, <var>start</var>, <var>deleted count</var>, and <var>new length</var>.</p></li>

<li>
<p>Run the appropriate set of substeps from the following list:</p>
Expand Down