File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -289,16 +289,16 @@ - (BOOL)secureTextEntry {
289289
290290- (void )setSecureTextEntry : (BOOL )secureTextEntry {
291291 UIView<RCTBackedTextInputViewProtocol> *textInputView = self.backedTextInputView ;
292-
292+
293293 if (textInputView.secureTextEntry != secureTextEntry) {
294294 textInputView.secureTextEntry = secureTextEntry;
295-
295+
296296 // Fix #5859, see https://stackoverflow.com/questions/14220187/uitextfield-has-trailing-whitespace-after-securetextentry-toggle/22537788#22537788
297297 NSAttributedString *originalText = [textInputView.attributedText copy ];
298298 self.backedTextInputView .attributedText = [NSAttributedString new ];
299299 self.backedTextInputView .attributedText = originalText;
300300 }
301-
301+
302302}
303303
304304#pragma mark - RCTBackedTextInputDelegate
@@ -405,7 +405,7 @@ - (BOOL)textInputShouldChangeTextInRange:(NSRange)range replacementText:(NSStrin
405405 }
406406
407407 NSString *previousText = backedTextInputView.attributedText .string ?: @" " ;
408-
408+
409409 if (range.location + range.length > backedTextInputView.attributedText .string .length ) {
410410 _predictedText = backedTextInputView.attributedText .string ;
411411 } else {
@@ -511,6 +511,13 @@ - (CGSize)sizeThatFits:(CGSize)size
511511 return fittingSize;
512512}
513513
514+ #pragma mark - Accessibility
515+
516+ - (UIView *)reactAccessibilityElement
517+ {
518+ return self.backedTextInputView ;
519+ }
520+
514521#pragma mark - Focus Control
515522
516523- (void )reactFocus
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ @implementation RCTBaseTextInputViewManager
3434
3535#pragma mark - Unified <TextInput> properties
3636
37- RCT_REMAP_VIEW_PROPERTY (accessibilityLabel, reactAccessibilityElement.accessibilityLabel, NSString )
3837RCT_REMAP_VIEW_PROPERTY (autoCapitalize, backedTextInputView.autocapitalizationType, UITextAutocapitalizationType)
3938RCT_REMAP_VIEW_PROPERTY(autoCorrect, backedTextInputView.autocorrectionType, UITextAutocorrectionType)
4039RCT_REMAP_VIEW_PROPERTY(contextMenuHidden, backedTextInputView.contextMenuHidden, BOOL )
You can’t perform that action at this time.
0 commit comments