mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +00:00
Fix accessibility event properties for TextInput (#24641)
Summary: When a `TextInput` receives any accessibility event prop (`onAccessibilityTap`, `onMagicTap`, `onAccessibilityEscape`, `onAccessibilityEscape`), causes a crash. <p align=center><img src=https://user-images.githubusercontent.com/20709038/56871548-84f00980-69ed-11e9-8906-0206899e5435.jpg width=300></p> [iOS] [Fixed] - Fix accessibility event properties for `TextInput` Pull Request resolved: https://github.com/facebook/react-native/pull/24641 Differential Revision: D15120211 Pulled By: cpojer fbshipit-source-id: 7996ab9f9b78588fab4986c3de6114817ec37296
This commit is contained in:
parent
ded7119c9a
commit
dbf27f5211
@ -511,13 +511,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|||||||
return fittingSize;
|
return fittingSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Accessibility
|
|
||||||
|
|
||||||
- (UIView *)reactAccessibilityElement
|
|
||||||
{
|
|
||||||
return self.backedTextInputView;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - Focus Control
|
#pragma mark - Focus Control
|
||||||
|
|
||||||
- (void)reactFocus
|
- (void)reactFocus
|
||||||
|
@ -34,6 +34,7 @@ RCT_EXPORT_MODULE()
|
|||||||
|
|
||||||
#pragma mark - Unified <TextInput> properties
|
#pragma mark - Unified <TextInput> properties
|
||||||
|
|
||||||
|
RCT_REMAP_VIEW_PROPERTY(accessibilityLabel, reactAccessibilityElement.accessibilityLabel, NSString)
|
||||||
RCT_REMAP_VIEW_PROPERTY(autoCapitalize, backedTextInputView.autocapitalizationType, UITextAutocapitalizationType)
|
RCT_REMAP_VIEW_PROPERTY(autoCapitalize, backedTextInputView.autocapitalizationType, UITextAutocapitalizationType)
|
||||||
RCT_REMAP_VIEW_PROPERTY(autoCorrect, backedTextInputView.autocorrectionType, UITextAutocorrectionType)
|
RCT_REMAP_VIEW_PROPERTY(autoCorrect, backedTextInputView.autocorrectionType, UITextAutocorrectionType)
|
||||||
RCT_REMAP_VIEW_PROPERTY(contextMenuHidden, backedTextInputView.contextMenuHidden, BOOL)
|
RCT_REMAP_VIEW_PROPERTY(contextMenuHidden, backedTextInputView.contextMenuHidden, BOOL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user