From ea2ab54c6fcfc6dbb3939ab5105063c0676b2968 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 20 Feb 2025 10:13:20 +0000 Subject: [PATCH 1/6] Update Button and Input Activation behaviours Reset buttons and inputs no longer trigger popover target activation behaviour. Reset buttons no longer trigger command button activation behaviour. --- source | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/source b/source index e3b59d5d955..01607c7eb22 100644 --- a/source +++ b/source @@ -48262,6 +48262,9 @@ interface HTMLInputElement : HTMLElement {
  • Run element's input activation behavior, if any, and do nothing otherwise.

  • +
  • If element has a form owner and elementis not in the + Button state, then return.

  • +
  • Run the popover target attribute activation behavior given element and event's target.

  • @@ -53618,7 +53621,8 @@ interface HTMLButtonElement : HTMLElement {
    1. If element has a form owner and element's type attribute is in the Submit Button state, then return.

    2. + data-x="attr-button-type-submit-state">Submit Button or the Reset Button state, then return.

    3. Let command be element's command attribute.

    4. @@ -53716,9 +53720,17 @@ interface HTMLButtonElement : HTMLElement {
    -
  • Otherwise, run the popover target attribute activation behavior given - element and event's target.

  • +
  • Otherwise

    +
      +
    1. If element has a form owner and element's type attribute is not in the Button, then return.

    2. + +
    3. Run the popover target attribute activation behavior given + element and event's target.

    4. +
    +
  • An HTML element can have specific From 4bfab38e3041a29814278f50b375fdbc8898aad6 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 20 Feb 2025 11:06:34 +0000 Subject: [PATCH 2/6] Move steps higher up --- source | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/source b/source index 01607c7eb22..8f9480add3b 100644 --- a/source +++ b/source @@ -53608,6 +53608,10 @@ interface HTMLButtonElement : HTMLElement { Reset Button state, then reset element's form owner.

    + +
  • If element's type attribute is not in + the Button or the Auto state, then return.

  • @@ -53619,11 +53623,6 @@ interface HTMLButtonElement : HTMLElement {

    If target is not null:

      -
    1. If element has a form owner and element's type attribute is in the Submit Button or the Reset Button state, then return.

    2. -
    3. Let command be element's command attribute.

    4. @@ -53720,17 +53719,9 @@ interface HTMLButtonElement : HTMLElement {
    -
  • Otherwise

    -
      -
    1. If element has a form owner and element's type attribute is not in the Button, then return.

    2. - -
    3. Run the popover target attribute activation behavior given - element and event's target.

    4. -
    -
  • +
  • Otherwise, run the popover target attribute activation behavior given + element and event's target.

  • An HTML element can have specific From 8bcbbf9eab3df8b8fe2af268f89f821bf70a89a2 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 20 Feb 2025 11:23:44 +0000 Subject: [PATCH 3/6] Add early returns --- source | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source b/source index 8f9480add3b..373c34a93a4 100644 --- a/source +++ b/source @@ -48262,7 +48262,7 @@ interface HTMLInputElement : HTMLElement {

  • Run element's input activation behavior, if any, and do nothing otherwise.

  • -
  • If element has a form owner and elementis not in the +

  • If element has a form owner and element is not in the Button state, then return.

  • Run the popover target attribute activation behavior given element @@ -53602,16 +53602,12 @@ interface HTMLButtonElement : HTMLElement { then submit element's form owner from element with userInvolvement set to event's user navigation involvement.

  • + data-x="event-uni">user navigation involvement, and return.

  • If element's type attribute is in the Reset Button state, then reset element's - form owner.

  • - -
  • If element's type attribute is not in - the Button or the Auto state, then return.

  • + data-x="concept-form-reset">reset element's form owner, and + return.

    From 11b60e6dc69b67349df46f481acbdf0218d31f3e Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 20 Feb 2025 11:32:29 +0000 Subject: [PATCH 4/6] Add early return for auto state buttons --- source | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source b/source index 373c34a93a4..32aa2c8a4eb 100644 --- a/source +++ b/source @@ -53608,6 +53608,9 @@ interface HTMLButtonElement : HTMLElement { Reset Button state, then reset element's form owner, and return.

    + +
  • If element's type attribute is in the + Auto state, then return.

  • From 115bc00745184bdb17dd88f8b3b5b76a269350c8 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Tue, 25 Feb 2025 16:35:50 +0000 Subject: [PATCH 5/6] Address comments --- source | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source b/source index 32aa2c8a4eb..8b911dfa161 100644 --- a/source +++ b/source @@ -48262,8 +48262,9 @@ interface HTMLInputElement : HTMLElement {
  • Run element's input activation behavior, if any, and do nothing otherwise.

  • -
  • If element has a form owner and element is not in the - Button state, then return.

  • +
  • If element has a form owner and element's type attribute is not in the Button state, then return.

  • Run the popover target attribute activation behavior given element and event's target.

  • @@ -53611,6 +53612,9 @@ interface HTMLButtonElement : HTMLElement {
  • If element's type attribute is in the Auto state, then return.

  • + + From 81b178b324a0c82de7b767d8da55f08a8eb5694c Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Tue, 25 Feb 2025 16:53:51 +0000 Subject: [PATCH 6/6] Add indent to comment and remove newline --- source | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source b/source index 8b911dfa161..def78934be9 100644 --- a/source +++ b/source @@ -53612,9 +53612,8 @@ interface HTMLButtonElement : HTMLElement {
  • If element's type attribute is in the Auto state, then return.

  • - + https://github.com/whatwg/html/issues/10832 -->