From 2d5ed8634ff21c8b8e3cf708176d268428867c6d Mon Sep 17 00:00:00 2001
From: Joey Arhar
Date: Wed, 2 Apr 2025 11:52:09 -0700
Subject: [PATCH] Don't run light dismiss on right click
This fixes a bug where showing a popover during the contextmenu event
handler immediately gets light dismissed as soon as the user lifts up on
the mouse button because the contextmenu event is fired in between
pointerdown and pointerup.
Fixes https://github.com/whatwg/html/issues/10905
---
source | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/source b/source
index 2f6d690e48d..b0b73bfe9c8 100644
--- a/source
+++ b/source
@@ -3359,6 +3359,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
- The
MouseEvent
interface
- The
MouseEvent
interface's relatedTarget
attribute
+ - The
MouseEvent
interface's button
attribute
MouseEventInit
dictionary type
- The
FocusEvent
interface
@@ -62433,6 +62434,9 @@ interface HTMLDialogElement : HTMLElement {
event:
+ If event's button
is not 0, then
+ return.
+
Run light dismiss open popovers with event.
Run light dismiss open dialogs with event.