mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-13 09:30:23 +08:00
@@ -12,6 +12,7 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import AccessibilityUtil from '../../modules/AccessibilityUtil';
|
||||
import BoundingDimensions from './BoundingDimensions';
|
||||
import findNodeHandle from '../../modules/findNodeHandle';
|
||||
import normalizeColor from 'normalize-css-color';
|
||||
@@ -819,7 +820,11 @@ const TouchableMixin = {
|
||||
}
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
// prevent the default behaviour unless the Touchable functions as a link
|
||||
// and Enter is pressed
|
||||
if (!(which === ENTER && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user