You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disabled TouchableHighlight still receives keyboard focus if onPress is defined.
Steps To Reproduce
Set disabled={true} and define an onPress handler for a TouchableHighlight component
tab through and observe how it still receives keyboard focus
vs if you remove the onPress it behaves as expected and no longer gets keyboard focus
Expected Results
No response
CLI version
6.1.0
Environment
npx react-native info
Target Platform Version
No response
Target Device(s)
No response
Visual Studio Version
No response
Build Configuration
No response
Snack, code example, screenshot, or link to a repository
<View><TouchableHighlightdisabled={true}onPress={this._handlePress}><Text>text within a disabled touchable</Text></TouchableHighlight><TouchableHighlightonPress={this._handlePress}><Text>text within a disabled touchable</Text></TouchableHighlight></View>
The disabled TouchableHighlight still receives keyboard focus
The text was updated successfully, but these errors were encountered:
explicitly setting focusable to false can be used as a workaround. I think we'll want to do something similar to #9840 so that when the disabled prop is set to true, we make the control not focusable/inaccessible. This will mimic the behavior in XAML
Problem Description
from: #8781
Disabled TouchableHighlight still receives keyboard focus if onPress is defined.
Steps To Reproduce
disabled={true}
and define an onPress handler for a TouchableHighlight componentExpected Results
No response
CLI version
6.1.0
Environment
Target Platform Version
No response
Target Device(s)
No response
Visual Studio Version
No response
Build Configuration
No response
Snack, code example, screenshot, or link to a repository
The disabled TouchableHighlight still receives keyboard focus
The text was updated successfully, but these errors were encountered: