[menu][popover] Stop event propagation for `Menu.Popup` `onClick` and `onDoubleClick`
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
# Bug report
## Current behavior
Events from interactions with popups bubble up, which may trigger handlers attached to parent element.
## Expected behavior
The popup should stop event propagation to prevent unintended side effects.
## Reproducible example
https://codesandbox.io/p/sandbox/9jhghq
## Base UI version
beta-1.0.0-beta.0
## Which browser are you using?
Chrome
## Which OS are you using?
Mac OS
## Which assistive tech are you using (if applicable)?
-
## Additional context
In my case I encountered a problem when I had onclick and ondoubleclick handlers somewhere on the parent. Before that I used `Menu` from @mui and everything worked as expected. I think it's worth preventing at least these two events by default.
Workaround - assign handlers with `event.stopPropagation()` manually.
Contributor guide
Assessment
This issue has not been assessed yet.