-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Button onPointerUp event bubbling to MenuItem. #6088
Comments
Historically, we've had the stance that |
@LFDanLu Im not talking about Button in MenuItem. I say that Button should stop onPointerUp event propagation. |
I found a related test, and by looking at it, I'm afraid it doesn't work like that? react-spectrum/packages/@react-aria/interactions/test/usePress.test.js Lines 2871 to 2894 in b2c9961
Looks like only press events (i.e., |
@sookmax There are no onPress onPressStart onPressEnd events in DOM. They are synthetic in react-aria. Events that are triggered by onPress, onPressStart, onPressEnd must be stop propagated. |
Apologies for the delay. We can't actually stop propagation on the pointer up events because we actually rely on listening to that event here. I haven't tried but I don't believe we could change that listener to capturing + stopping propagation without breaking a bunch of things in usePress and related components. |
Provide a general summary of the issue here
Button onPointerUp event bubbling to MenuItem.
🤔 Expected Behavior?
Button calls stopPropagation on onPointerUp event
😯 Current Behavior
Button onPointerUp event bubbling to MenuItem. MenuItem catches onPointerUp event
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Version
react-aria-components 1.1.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macos
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: