Skip to content

[BUG] Events are not correctly propagated — global handlers cannot intercept them #5817

@barbu-vlad

Description

@barbu-vlad

HeroUI Version

2.8.5

Describe the bug

Event propagation appears to be interrupted in certain components. Global event handlers (e.g., document .addEventListener) cannot intercept user interactions as expected.

Your Example Website or App

https://codesandbox.io/p/devbox/react-heroui-4gqp6t?file=%2Fapp%2FTestcomponent.tsx%3A20%2C73

Steps to Reproduce the Bug or Issue

Steps to Reproduce

Use any interactive component (e.g., Button, Switch, etc).

Attach a global event listener:

document.addEventListener('click', () => console.log('Global click!'))

Interact with the component.

Expected behavior

The global handler should log the event when the component is clicked.

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions