oddbird / popover-polyfill

Polyfills the HTML popover attribute and showPopover/hidePopover/togglePopover methods onto HTMLElement, as well as the popovertarget and popovertargetaction attributes on <button> elements.
BSD 3-Clause "New" or "Revised" License
254 stars 14 forks source link

Clicking on slotted element closes the popover #214

Closed Totati closed 2 months ago

Totati commented 3 months ago

Describe the bug Clicking on a slotted html element closes the popover.

To Reproduce

  1. Go to https://codepen.io/Totati/pen/abgOBPP
  2. Click on "Open popover" button.
  3. Click on the red area. It's the slotted element.

Clicking in the green element does not closes the popover.

Expected behavior This example works correctly in new browsers, the polyfill should handle this case as well :)

Browsers tested on Chromium Version 101.0.4949.0 (Developer Build) (64-bit)

jgerigmeyer commented 2 months ago

Closed by #215