Skip to content

Commit

Permalink
fix(fabric): Disable TextInput prop enablesReturnKeyAutomatically o…
Browse files Browse the repository at this point in the history
…n macOS (microsoft#2283)
  • Loading branch information
Saadnajmi authored Nov 15, 2024
1 parent 57fc114 commit 9d326ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL contextMenuHidden;
@property (nonatomic, assign, getter=isEditable) BOOL editable;
@property (nonatomic, assign) BOOL caretHidden;
@property (nonatomic, assign) BOOL enablesReturnKeyAutomatically;
#if !TARGET_OS_OSX // [macOS]
@property (nonatomic, assign) BOOL enablesReturnKeyAutomatically;
@property (nonatomic, assign) UITextFieldViewMode clearButtonMode;
#endif // [macOS]
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
_backedTextInputView.editable = newTextInputProps.traits.editable;
}

#if !TARGET_OS_OSX // [macOS]
if (newTextInputProps.traits.enablesReturnKeyAutomatically !=
oldTextInputProps.traits.enablesReturnKeyAutomatically) {
_backedTextInputView.enablesReturnKeyAutomatically = newTextInputProps.traits.enablesReturnKeyAutomatically;
}

#if !TARGET_OS_OSX // [macOS]
if (newTextInputProps.traits.keyboardAppearance != oldTextInputProps.traits.keyboardAppearance) {
_backedTextInputView.keyboardAppearance =
RCTUIKeyboardAppearanceFromKeyboardAppearance(newTextInputProps.traits.keyboardAppearance);
Expand Down

0 comments on commit 9d326ef

Please sign in to comment.