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
onClick cannot be triggered using continuePropagation #6267
Comments
As far as I can tell, only react-spectrum/packages/@react-aria/interactions/test/usePress.test.js Lines 2896 to 2921 in b2c9961
The description of react-spectrum/packages/@react-types/shared/src/events.d.ts Lines 48 to 53 in b2c9961
|
This is a major issue since you might have third-party libraries that apply event listeners on wrapping components, that ain't a PressEvent (like MouseEvent), expecting the event to propagate. Right now it's impossible to prevent the propagation from being stopped in those cases which totally breaks the other library, in our case, hotjar (https://help.hotjar.com/hc/en-us/articles/7053232973975-Heatmap-Data-Troubleshooting). |
Related: I'm seeing this in the context of a Checkbox, where a press (combined with https://codesandbox.io/p/sandbox/trusting-night-9q9824 Screen.Recording.2024-05-01.at.1.28.28.PM.mov |
Provide a general summary of the issue here
onClick should be able to be triggered on parent but it is not, calling the e.continuePropagation does not change the parent onClick to be able to be triggered.
🤔 Expected Behavior?
onClick should be able to be triggered on parent
😯 Current Behavior
onClick is not triggered on parent when clicking a child onPress or onPressStart with continuePropagation.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/pensive-monad-vp8yp2?file=%2Fsrc%2FApp.js%3A25%2C17
Version
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: