Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corner case invoker issue with popover nested inside invoker #10770

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mfreed7
Copy link
Contributor

@mfreed7 mfreed7 commented Nov 16, 2024

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 patch fixes that case by checking that the invoke event wasn't on the popover itself.

(See WHATWG Working Mode: Changes for more details.)


/form-elements.html ( diff )
/input.html ( diff )
/popover.html ( diff )

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 patch fixes that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant