Skip to content

Commit 2d5ed86

Browse files
committed
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 whatwg#10905
1 parent 734afba commit 2d5ed86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source

+4
Original file line numberDiff line numberDiff line change
@@ -3359,6 +3359,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
33593359
<ul class="brief">
33603360
<li>The <dfn data-x-href="https://w3c.github.io/uievents/#mouseevent"><code>MouseEvent</code></dfn> interface</li>
33613361
<li>The <code>MouseEvent</code> interface's <dfn data-x="dom-MouseEvent-relatedTarget" data-x-href="https://w3c.github.io/uievents/#dom-mouseevent-relatedtarget"><code>relatedTarget</code></dfn> attribute</li>
3362+
<li>The <code>MouseEvent</code> interface's <dfn data-x="dom-MouseEvent-button" data-x-href="https://w3c.github.io/uievents/#dom-mouseevent-button"><code>button</code></dfn> attribute</li>
33623363
<li><dfn data-x-href="https://w3c.github.io/uievents/#dictdef-mouseeventinit"><code>MouseEventInit</code></dfn> dictionary type</li>
33633364

33643365
<li>The <dfn data-x-href="https://w3c.github.io/uievents/#focusevent"><code>FocusEvent</code></dfn> interface</li>
@@ -62433,6 +62434,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6243362434
<var>event</var>:</p>
6243462435

6243562436
<ol>
62437+
<li><p>If <var>event</var>'s <code data-x="dom-MouseEvent-button">button</code> is not 0, then
62438+
return.</p></li>
62439+
6243662440
<li><p>Run <span>light dismiss open popovers</span> with <var>event</var>.</p></li>
6243762441

6243862442
<li><p>Run <span>light dismiss open dialogs</span> with <var>event</var>.</p></li>

0 commit comments

Comments
 (0)