-
Notifications
You must be signed in to change notification settings - Fork 105
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
e.stopPropagation on event bubbling breaks touchTap #54
Comments
Hi, is any work being done on this, or is there a known workaround? This is a blocking issue for me, and I haven't yet found a way around it. The only option I seem to be left with is to stop using some of the material-ui components (such as SelectField). |
Although it's not clear to me why mousedown events are getting lost under the scenario described by the OP, I used the fact that click events do reach their intended targets to hack together a solution. This has not been tested extensively, and undoubtably will fall short of an acceptable long term solution. However, it's a usable bandaid in my project, and means the material-ui components that I'm using will not need to be replaced, and my project code doesn't need to jump through any hoops. I've modified 3 lines in the extractEvents method of the TapEvent module, to essentially translate click events into touchTap events for components that only listen for touch events. The modified lines are preceded with "SRS"...
Hopefully the React and/or Material-ui teams will get something into a core update before I realize what this hack breaks... |
this bug still here? |
Hi,
a MWE can be found at https://github.com/alendit/react-tap-event-bubbling-issue
When I add a listener on a bubbling of a
mousedown
event, which stops the further propagation,touchTap
events of the children stop working (HelloTapOnly
in the example).click
events continue to work as expected (HelloClickAndTap
).This breaks a couple of elements in the
material-ui
in my use case, where I want to stop event propagation to the parent elements of a control panel. In my example I useDropDownMenu
.If you comment out the line 22 in
index.js
everything works fine.The text was updated successfully, but these errors were encountered: