mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-28 16:45:17 +00:00
@@ -12,6 +12,7 @@
|
|||||||
* @flow
|
* @flow
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import AccessibilityUtil from '../../modules/AccessibilityUtil';
|
||||||
import BoundingDimensions from './BoundingDimensions';
|
import BoundingDimensions from './BoundingDimensions';
|
||||||
import findNodeHandle from '../../modules/findNodeHandle';
|
import findNodeHandle from '../../modules/findNodeHandle';
|
||||||
import normalizeColor from 'normalize-css-color';
|
import normalizeColor from 'normalize-css-color';
|
||||||
@@ -819,7 +820,11 @@ const TouchableMixin = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
e.stopPropagation();
|
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