diff --git a/source b/source index 358f962be8a..98be781a3ef 100644 --- a/source +++ b/source @@ -51780,17 +51780,18 @@ You cannot submit this form when the field is incorrect.

For input elements without a defined input activation behavior, but to which these events apply, and for which the user - interface involves both interactive manipulation and an explicit commit action, then when the user - changes the element's value, the user agent must + interface involves both interactive manipulation and an explicit commit action, then when the + user changes the element's value, the user agent must queue an element task on the user interaction task source given the input element to fire an event named input at the input element, with the bubbles and composed attributes initialized to true, and any time the user commits the change, the user agent must queue an element task on the user interaction task source given the - input element to fire an event named change at the input element, with the bubbles attribute initialized to true.

+ input element to set its user interacted to true and fire an event named change + at the input element, with the bubbles + attribute initialized to true.

An example of a user interface involving both interactive manipulation and a commit action would be a Range controls that use a @@ -54673,6 +54674,9 @@ interface HTMLLegendElement : HTMLElement { default value. If it is false, value mirrors the default value. If it is true, the default value is ignored.

+

input and textarea elements have a user interacted (a boolean). + It is initially set to false.

+

To define the behavior of constraint validation in the face of the input element's multiple attribute, input elements can also have separately defined values.

@@ -58731,8 +58735,8 @@ fur

The algorithm to construct the entry list given a - form, an optional submitter, and an optional encoding, is as - follows. If not specified otherwise, submitter is null.

+ form, an optional submitter, an optional resetUserInteracted + and an optional encoding, is as follows. If not specified otherwise, submitter is null.

  1. If form's constructing entry list is true, then return @@ -58749,6 +58753,8 @@ fur

    For each element field in controls, in tree order:

      +
    1. If resetUserInteracted is true, set field's user interacted to false.
    2. +
    3. If any of the following is true:

      @@ -72549,6 +72555,32 @@ Demos: +
      :user-valid
      +
      +

      The :user-valid pseudo-class must match + any element falling into one of the following categories:

      +
        +
      • input and textarea elements that have their user interacted + set to true, are candidates for constraint validation + and that satisfy their constraints.
      • +
      • Buttons and other built-in elements that are candidates + for constraint validation and that satisfy their constraints.
      • +
      +
      + +
      :user-invalid
      +
      +

      The :user-valid pseudo-class must match + any element falling into one of the following categories:

      +
        +
      • input and textarea elements that have their user interacted + set to true, are candidates for constraint validation + but do not satisfy their constraints.
      • +
      • Buttons and other built-in elements that are candidates + for constraint validation but do not satisfy their constraints.
      • +
      +
      +
      :in-range

      The :in-range pseudo-class must match @@ -77870,16 +77902,24 @@ partial interface Navigator { these substeps:

        -
      1. If entry is an input - element, and the change event applies to the element, and the element does not have a - defined activation behavior, and the user has changed the element's value or its list of selected files while the control was focused - without committing that change (such that it is different to what it was when the control was - first focused), then fire an event named change at the element, with the bubbles attribute initialized to true.

        +
      2. +

        If entry is an input + element, and the change event applies to the element, and the element does not have a + defined activation behavior, and the user has changed the element's value or its list of selected files while the control was focused + without committing that change (such that it is different to what it was when the control was + first focused), then: + +

          +
        1. Set entry's user interacted to true.
        2. + +
        3. Fire an event named change at the element, with the bubbles attribute initialized to true.
        4. +
        +
      3. If entry is an element, let blur event target be