-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iOS): Keyboard not working properly on iOS 17 (#5343)
- Loading branch information
1 parent
af8233d
commit 1d568c9
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m b/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m | ||
index 1ca52e8..323a04c 100644 | ||
--- a/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m | ||
+++ b/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m | ||
@@ -115,21 +115,25 @@ - (void)setHeight:(CGFloat)height | ||
|
||
- (void)_keyboardWillShowNotification:(NSNotification*)notification | ||
{ | ||
- _keyboardState = KeyboardStateWillShow; | ||
+ if (_keyboardState != KeyboardStateShown) { | ||
+ _keyboardState = KeyboardStateWillShow; | ||
|
||
- [self invalidateIntrinsicContentSize]; | ||
+ [self invalidateIntrinsicContentSize]; | ||
|
||
- if([_delegate respondsToSelector:@selector(ObservingInputAccessoryViewTempKeyboardWillAppear:keyboardDelta:)]) | ||
- { | ||
- [_delegate ObservingInputAccessoryViewTempKeyboardWillAppear:self keyboardDelta:_keyboardHeight - _previousKeyboardHeight]; | ||
+ if([_delegate respondsToSelector:@selector(ObservingInputAccessoryViewTempKeyboardWillAppear:keyboardDelta:)]) | ||
+ { | ||
+ [_delegate ObservingInputAccessoryViewTempKeyboardWillAppear:self keyboardDelta:_keyboardHeight - _previousKeyboardHeight]; | ||
+ } | ||
} | ||
} | ||
|
||
- (void)_keyboardDidShowNotification:(NSNotification*)notification | ||
{ | ||
- _keyboardState = KeyboardStateShown; | ||
+ if (_keyboardState != KeyboardStateShown) { | ||
+ _keyboardState = KeyboardStateShown; | ||
|
||
- [self invalidateIntrinsicContentSize]; | ||
+ [self invalidateIntrinsicContentSize]; | ||
+ } | ||
} | ||
|
||
- (void)_keyboardWillHideNotification:(NSNotification*)notification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters