You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As written, PopoverButton does not propagate parent events, it's as if there is an internal stopPropagation method assigned to it somewhere. I could not find a workaround.
See below code
<div onClick={() => console.log("parent event clicked!")}>
<Menu>
<MenuButton>Click Menu</MenuButton> {/* clicking this triggers parent click */}
<MenuItems>Menu shown</MenuItems>
</Menu>
<Popover>
<PopoverButton>Click Popover</PopoverButton> {/* clicking this does not trigger parent click */}
<PopoverPanel>Popover shown</PopoverPanel>
</Popover>
</div>
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v2.2.0
What browser are you using?
Chrome
The text was updated successfully, but these errors were encountered:
rangelojc
changed the title
PopoverButton is not propagating parent events
PopoverButton is not propagating parent events compared to Menu
Feb 22, 2025
rangelojc
changed the title
PopoverButton is not propagating parent events compared to Menu
PopoverButton is not propagating parent events compared to MenuButton
Feb 22, 2025
As written, PopoverButton does not propagate parent events, it's as if there is an internal stopPropagation method assigned to it somewhere. I could not find a workaround.
See below code
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v2.2.0
What browser are you using?
Chrome
The text was updated successfully, but these errors were encountered: