The problem
Hello, I recently found out the props.disable of Touchable will not prevent it from clicking if props.href is provided, although it prevents the onPress event to be fired, but still will be navigated to the distination.
How to reproduce
Simplified test case: https://codesandbox.io/s/cocky-smoke-pl5kog
Steps to reproduce:
- render a
TouchableOpacity or TouchableHighlight with props.href="https://github.com/" and props.disabled={true}
- click on the touchable
Expected behavior
Should not be navigated to "/" since the touchable is disabled
Environment (include versions). Did this work in previous versions?
- React Native for Web (version): TBC
- React (version): TBC
- Browser: TBC
The problem
Hello, I recently found out the
props.disableof Touchable will not prevent it from clicking ifprops.hrefis provided, although it prevents the onPress event to be fired, but still will be navigated to the distination.How to reproduce
Simplified test case: https://codesandbox.io/s/cocky-smoke-pl5kog
Steps to reproduce:
TouchableOpacityorTouchableHighlightwithprops.href="https://github.com/"andprops.disabled={true}Expected behavior
Should not be navigated to "/" since the touchable is disabled
Environment (include versions). Did this work in previous versions?