Skip to content

Commit dac8ec1

Browse files
authored
Fix corner case invoker issue with popover nested inside invoker
In this situation ``` <button popovertarget=foo>Activate <div popover id=foo>Clicking me shouldn't close me</div> </button> ``` clicking the button properly activates the popover, however, clicking on the popover itself after that should not close the popover. It currently does because the popover click bubbles to the `<button>` and activates the invoker, which toggles the popover closed. This fixes that case.
1 parent 531d153 commit dac8ec1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

source

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48214,8 +48214,8 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
4821448214
<li><p>Run <var>element</var>'s <dfn>input activation behavior</dfn>, if any, and do nothing
4821548215
otherwise.</p></li>
4821648216

48217-
<li><p>Run the <span>popover target attribute activation behavior</span> on
48218-
<var>element</var>.</p></li>
48217+
<li><p>Run the <span>popover target attribute activation behavior</span> given <var>element</var>
48218+
and <var>event</var>'s <span data-x="concept-event-target">target</span>.</p></li>
4821948219
</ol>
4822048220

4822148221
<p class="note">Recall that an element's <span>activation behavior</span> runs for both
@@ -53512,8 +53512,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
5351253512
</dl>
5351353513
</li>
5351453514

53515-
<li><p>Run the <span>popover target attribute activation behavior</span> given
53516-
<var>element</var>.</p></li>
53515+
<li><p>Run the <span>popover target attribute activation behavior</span> given <var>element</var>
53516+
and <var>event</var>'s <span data-x="concept-event-target">target</span>.</p></li>
5351753517
</ol>
5351853518

5351953519
</div>
@@ -86382,13 +86382,18 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8638286382
attribute, <span>limited to only known values</span>.</p>
8638386383

8638486384
<p>To run the <dfn>popover target attribute activation behavior</dfn> given a <code>Node</code>
86385-
<var>node</var>:</p>
86385+
<var>node</var> and a <code>Node</code> <var>eventTarget</var>:</p>
8638686386

8638786387
<ol>
8638886388
<li><p>Let <var>popover</var> be <var>node</var>'s <span>popover target element</span>.</p></li>
8638986389

8639086390
<li><p>If <var>popover</var> is null, then return.</p></li>
8639186391

86392+
<li><p>If <var>eventTarget</var> is a <span>shadow-including inclusive descendant</span> of
86393+
<var>popover</var> and <var>popover</var> is a
86394+
<span data-x="shadow-including descendant">shadow-including descendant</span> of <var>node</var>,
86395+
then return.</p></li>
86396+
8639286397
<li><p>If <var>node</var>'s <code data-x="attr-popovertargetaction">popovertargetaction</code>
8639386398
attribute is in the <span data-x="attr-popovertargetaction-show">show</span> state and
8639486399
<var>popover</var>'s <span>popover visibility state</span> is <span

0 commit comments

Comments
 (0)