-
Notifications
You must be signed in to change notification settings - Fork 45.5k
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
ResponderEventPlugin regression in React 15.4.0 #8370
Comments
If you add a React DOM node to your tree with |
Yes it does! It appears that all the Touchable and PanResponder examples work (mouse and touch) if the page also includes: <div
onMouseDown={()=>{}}
onMouseMove={()=>{}}
onMouseUp={()=>{}}
onTouchStart={()=>{}}
onTouchMove={()=>{}}
onTouchEnd={()=>{}}
/> |
I'm wondering how can we move this forward. Any directions to help a capable developer try to submit a pull request? |
If you're looking for an intro to the event system, this might be helpful. https://www.youtube.com/watch?v=dRo_egw7tBc |
We need to add dependencies to these event types:
It is tricky though because the plugin is shared between web and native and they have different event names. It may work to just always include the mouse events but I'm not sure if that causes problems in RN. |
Which dependencies exactly? I've set mouse dependencies in RNW but that stopped working with React@15.4 - https://github.com/necolas/react-native-web/blob/f8f28980957ecb46393981d9b4bdfc820da06c26/src/modules/injectResponderEventPlugin.js |
Oh, I would have thought that works. This code should run for your responder event handler and cause those deps to be listened to: https://github.com/facebook/react/blob/v15.4.0/src/renderers/dom/shared/ReactDOMComponent.js#L221 |
The problem was that the |
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
The
ResponderEventPlugin
no longer recognizes start DOM events.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).
The
EventPluginUtils.isStartish
helper only checks for mouse/touch start events. In this section of code, thetopLevelType
used to be onlytopMouseDown
ortopTouchStart
in React 15.3, but is nowtopClick
in React 15.4.0. This means the event plugin can no longer recognize start events.This PR exposes the issue in
react-native-web
, which uses theResponderEventPlugin
: necolas/react-native-web#255What is the expected behavior?
The same behaviour as exhibited with React 15.3.2.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Works in React 15.3.2. Doesn't work in React 15.4.0.
The text was updated successfully, but these errors were encountered: