Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickOutside with stopPropagation unstable in teleport mode #1074

Open
auirarrazaval opened this issue Jan 21, 2025 · 0 comments
Open

clickOutside with stopPropagation unstable in teleport mode #1074

auirarrazaval opened this issue Jan 21, 2025 · 0 comments
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working

Comments

@auirarrazaval
Copy link

auirarrazaval commented Jan 21, 2025

Describe the bug
In teleport mode, the click event is propagated if the value is changes more than once, despite setting the allowStopPropagation config to true

[EDIT] I believe it's actually any second click, as clicking the select button will also cause the event to be propagated

To Reproduce
Steps to reproduce the behavior:

  1. Instantiate the component with teleport and allowStopPropagation, with autoApply: false.
  2. Open the calendar.
  3. Click on a date, then click on another date
  4. The click event is propagated to the background

Expected behavior
If the initial event propagation is stopped, there's no reason as of why the second one shouldn't.

In my case, and as you can see below, this is an issue because the component overflows from a modal, which also has a clickOutside handler. This handler gets triggered because the second date update propagates the click and that causes the modal to close.

Screenshots

Image

Desktop & mobile (please complete the following information):

  • Browser: Chrome
  • Library version: 11.0.1
@auirarrazaval auirarrazaval added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant