MM-54535 Fixed hang when using the magic keyboard on iPadOS 17 (#7555)

* MM-53989 Upgrade to Node 18 and NPM 9 and match platform versions

* fix iPad OS 17 magic keyboard loop

* add engine-strict=true to npmrc

* use node version from nvmrc in action
This commit is contained in:
Elias Nahum 2023-09-27 18:54:33 +03:00 committed by GitHub
parent 1121cca649
commit 16ca5d3e97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 17 deletions

View file

@ -7,7 +7,7 @@ runs:
- name: ci/setup-node - name: ci/setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version: "${{ env.NODE_VERSION }}" node-version-file: ".nvmrc"
cache: "npm" cache: "npm"
cache-dependency-path: package-lock.json cache-dependency-path: package-lock.json

View file

@ -1 +1 @@
18.7.0 18.17

1
.npmrc
View file

@ -1 +1,2 @@
save-exact=true save-exact=true
engine-strict=true

2
.nvmrc
View file

@ -1 +1 @@
18.7.0 18.17

View file

@ -4,20 +4,6 @@
"output" : "moderate" "output" : "moderate"
}, },
"requirements": { "requirements": {
"Node": [
{
"rule": "cli",
"binary": "node",
"semver": ">=16.0.0",
"error": "install node using nvm https://github.com/nvm-sh/nvm#installing-and-updating"
},
{
"rule": "cli",
"binary": "npm",
"semver": ">=7.24.0 <9.0.0",
"error": "install npm 8.5.5 `npm i -g npm@8.5.5"
}
],
"Android": [ "Android": [
{ {
"rule": "cli", "rule": "cli",

4
package-lock.json generated
View file

@ -177,6 +177,10 @@
"underscore": "1.13.6", "underscore": "1.13.6",
"util": "0.12.5", "util": "0.12.5",
"uuid": "9.0.0" "uuid": "9.0.0"
},
"engines": {
"node": "^18.10.0",
"npm": "^9.0.0"
} }
}, },
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {

View file

@ -6,6 +6,10 @@
"author": "Mattermost, Inc.", "author": "Mattermost, Inc.",
"license": "Apache 2.0", "license": "Apache 2.0",
"private": true, "private": true,
"engines": {
"node": "^18.10.0",
"npm": "^9.0.0"
},
"dependencies": { "dependencies": {
"@formatjs/intl-datetimeformat": "6.10.0", "@formatjs/intl-datetimeformat": "6.10.0",
"@formatjs/intl-getcanonicallocales": "2.2.1", "@formatjs/intl-getcanonicallocales": "2.2.1",

View file

@ -413,6 +413,43 @@ index 1333a10..b908006 100644
RCT_EXPORT_METHOD(getNativeProps:(nonnull NSNumber *)reactTag resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) RCT_EXPORT_METHOD(getNativeProps:(nonnull NSNumber *)reactTag resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{ {
[self.bridge.uiManager addUIBlock: [self.bridge.uiManager addUIBlock:
diff --git a/node_modules/react-native-keyboard-tracking-view/lib/ObservingInputAccessoryView.m b/node_modules/react-native-keyboard-tracking-view/lib/ObservingInputAccessoryView.m
index e472679..4a2204b 100644
--- a/node_modules/react-native-keyboard-tracking-view/lib/ObservingInputAccessoryView.m
+++ b/node_modules/react-native-keyboard-tracking-view/lib/ObservingInputAccessoryView.m
@@ -115,21 +115,25 @@
- (void)_keyboardWillShowNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateWillShow;
+ if (_keyboardState != KeyboardStateShown) {
+ _keyboardState = KeyboardStateWillShow;
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
- if([_delegate respondsToSelector:@selector(observingInputAccessoryViewKeyboardWillAppear:keyboardDelta:)])
- {
- [_delegate observingInputAccessoryViewKeyboardWillAppear:self keyboardDelta:_keyboardHeight - _previousKeyboardHeight];
+ if([_delegate respondsToSelector:@selector(observingInputAccessoryViewKeyboardWillAppear:keyboardDelta:)])
+ {
+ [_delegate observingInputAccessoryViewKeyboardWillAppear:self keyboardDelta:_keyboardHeight - _previousKeyboardHeight];
+ }
}
}
- (void)_keyboardDidShowNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateShown;
+ if (_keyboardState != KeyboardStateShown) {
+ _keyboardState = KeyboardStateShown;
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
+ }
}
- (void)_keyboardWillHideNotification:(NSNotification*)notification
diff --git a/node_modules/react-native-keyboard-tracking-view/src/KeyboardTrackingView.android.js b/node_modules/react-native-keyboard-tracking-view/src/KeyboardTrackingView.android.js diff --git a/node_modules/react-native-keyboard-tracking-view/src/KeyboardTrackingView.android.js b/node_modules/react-native-keyboard-tracking-view/src/KeyboardTrackingView.android.js
index af15edf..20b6ab6 100644 index af15edf..20b6ab6 100644
--- a/node_modules/react-native-keyboard-tracking-view/src/KeyboardTrackingView.android.js --- a/node_modules/react-native-keyboard-tracking-view/src/KeyboardTrackingView.android.js