Overlay Components : hide on click outside does not work if clicked element have a stopPropagation #7234
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
In PrimeVue some components that have an overlay (such as Popup, Select, Menu, etc.), the overlay is expected to hide when clicking outside the component.
However, if the click event is triggered on an element that has a stopPropagation applied, either directly on the element or on one of its parent elements, the overlay does not hide on a click outside. This issue prevents proper behavior of the overlay, as the stopPropagation interrupts the outside click event from being recognized by the document.
I’m not sure if this is a bug or an edge case, but this configuration seems fairly common, so I’m opening this issue.
Pull Request Link
#7233
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-fovhrzsq
Environment
Any environnement
Vue version
3.5.0
PrimeVue version
4.2.5
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
When Menu2 is shown, Menu1 should be hidden
The text was updated successfully, but these errors were encountered: