From bfa954786c5f3da37519f1ece98b2c956fdc3ad2 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Fri, 20 Feb 2026 16:18:47 +0000 Subject: [PATCH 1/4] Handle commandfor buttons in popover light dismiss code --- source | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/source b/source index c16dde7c133..8c5de482acb 100644 --- a/source +++ b/source @@ -91990,8 +91990,8 @@ dictionary DragEventInit : MouseEventInit {

While currentNode is not null:

    -
  1. Let targetPopover be currentNode's popover target - element.

  2. +
  3. Let targetPopover be currentNode's target popover. +

  4. If targetPopover is not null and targetPopover's popover attribute is in the DragEventInit : MouseEventInit {

+
+

To get the target popover given a Node node, perform the + following steps. They return an HTML element or null.

+ +
    +
  1. +

    If node is a HTML button element, + then:

    + +
      +
    1. Let target be the result of running node's get the commandfor-associated + element.

    2. + +
    3. +

      If target is not null, then:

      + +
        +
      1. If node is disabled, then return + null.

      2. + +
      3. If target's popover attribute is in the + No Popover state, then return null.

      4. + +
      5. Return target.

      6. +
      +
    4. +
    +
  2. + +
  3. Return node's popover target element.

  4. +
+
+

Loading web pages

From 1c436fd91af9274cd2979aeee20ea9bdb7b670ac Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Fri, 20 Feb 2026 16:31:36 +0000 Subject: [PATCH 2/4] Exclude commandfor buttons when they're reset or submit buttons with a form owner from light dismiss logic. Without this change you end up in situations where light dismiss doesn't work as expected. --- source | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source b/source index 8c5de482acb..a60cc137a44 100644 --- a/source +++ b/source @@ -92028,6 +92028,25 @@ dictionary DragEventInit : MouseEventInit {
  • If node is disabled, then return null.

  • +
  • +

    If node has a form owner:

    + +
      +
    1. If element is a submit + button, then return null.

    2. + +
    3. If element's type attribute is in + the Reset Button state, then return + null.

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

    6. + +
    +
  • +
  • If target's popover attribute is in the No Popover state, then return null.

  • From 4b47a69396cf7128bb7007ac0cfcc605395bfe3d Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Fri, 20 Feb 2026 16:36:17 +0000 Subject: [PATCH 3/4] Exclude commandfor buttons without a popover command from light dismiss logic Without this change you end up in situations where light dismiss doesn't work as expected. --- source | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source b/source index a60cc137a44..7fd50ca81fb 100644 --- a/source +++ b/source @@ -92047,6 +92047,15 @@ dictionary DragEventInit : MouseEventInit { +
  • Let command be node's command attribute.

  • + +
  • If command is not in the Toggle Popover, Hide Popover, or Show Popover states, then return + null.

  • +
  • If target's popover attribute is in the No Popover state, then return null.

  • From b5099eb788fdf4837f027886a5c649e3e1dae9e3 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Fri, 20 Feb 2026 17:05:27 +0000 Subject: [PATCH 4/4] Make linter happy --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 7fd50ca81fb..4b2d33a82ad 100644 --- a/source +++ b/source @@ -92013,7 +92013,7 @@ dictionary DragEventInit : MouseEventInit {
    1. -

      If node is a HTML button element, +

      If node is an HTML button element, then: