Apply numeric text event bubbling fix for Android
Reviewed By: bvaughn Differential Revision: D4726029 fbshipit-source-id: 94c8025bb59cc0970b6cc8ce7f3caf6e867bf72b
This commit is contained in:
parent
b1a63f0088
commit
17cb70efdd
|
@ -138,7 +138,10 @@ var EventPluginHub = {
|
|||
return null;
|
||||
}
|
||||
} else {
|
||||
if (typeof inst._currentElement === 'string') {
|
||||
const currentElement = inst._currentElement;
|
||||
if (
|
||||
typeof currentElement === 'string' || typeof currentElement === 'number'
|
||||
) {
|
||||
// Text node, let it bubble through.
|
||||
return null;
|
||||
}
|
||||
|
@ -146,12 +149,11 @@ var EventPluginHub = {
|
|||
// If the instance is already unmounted, we have no listeners.
|
||||
return null;
|
||||
}
|
||||
const props = inst._currentElement.props;
|
||||
if (!props) {
|
||||
return null;
|
||||
}
|
||||
const props = currentElement.props;
|
||||
listener = props[registrationName];
|
||||
if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, props)) {
|
||||
if (
|
||||
shouldPreventMouseEvent(registrationName, currentElement.type, props)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue