Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use KeyboardAvoidingView from react-native-keyboard-controller #47096

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-keyboard-controller (1.12.2):
- react-native-keyboard-controller (1.13.0):
- glog
- hermes-engine
- RCT-Folly (= 2022.05.16.00)
Expand Down Expand Up @@ -2565,7 +2565,7 @@ SPEC CHECKSUMS:
react-native-geolocation: 580c86eb531c0aaf7a14bc76fd2983ce47ca58aa
react-native-image-picker: f8a13ff106bcc7eb00c71ce11fdc36aac2a44440
react-native-key-command: 28ccfa09520e7d7e30739480dea4df003493bfe8
react-native-keyboard-controller: 47c01b0741ae5fc84e53cf282e61cfa5c2edb19b
react-native-keyboard-controller: a8cbf848d0bc0e1976a07948f1c53b8432c1246c
react-native-launch-arguments: 5f41e0abf88a15e3c5309b8875d6fd5ac43df49d
react-native-netinfo: 02d31de0e08ab043d48f2a1a8baade109d7b6ca5
react-native-pager-view: ccd4bbf9fc7effaf8f91f8dae43389844d9ef9fa
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"react-native-image-picker": "^7.0.3",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#bf3ad41a61c4f6f80ed4d497599ef5247a2dd002",
"react-native-key-command": "^1.0.8",
"react-native-keyboard-controller": "^1.12.2",
"react-native-keyboard-controller": "1.13.0",
"react-native-launch-arguments": "^4.0.2",
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt b/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
index 83884d8..5d9e989 100644
index 6e566fc..82416a1 100644
--- a/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
+++ b/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
@@ -99,12 +99,12 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
@@ -117,11 +117,11 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
}

private fun goToEdgeToEdge(edgeToEdge: Boolean) {
Expand All @@ -11,29 +11,41 @@ index 83884d8..5d9e989 100644
- it.window,
- !edgeToEdge,
- )
- }
+ // reactContext.currentActivity?.let {
+ // WindowCompat.setDecorFitsSystemWindows(
+ // it.window,
+ // !edgeToEdge,
+ // )
+ // }
+ // reactContext.currentActivity?.let {
+ // WindowCompat.setDecorFitsSystemWindows(
+ // it.window,
+ // !edgeToEdge,
+ // )
}
}

private fun setupKeyboardCallbacks() {
@@ -158,13 +158,13 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
@@ -169,16 +169,16 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
// region State managers
private fun enable() {
this.goToEdgeToEdge(true)
- this.setupWindowInsets()
+ // this.setupWindowInsets()
this.setupKeyboardCallbacks()
- modalAttachedWatcher.enable()
+ // modalAttachedWatcher.enable()
}

private fun disable() {
this.goToEdgeToEdge(false)
- this.setupWindowInsets()
+ // this.setupWindowInsets()
this.removeKeyboardCallbacks()
- modalAttachedWatcher.disable()
+ // modalAttachedWatcher.disable()
}
// endregion

@@ -206,7 +206,7 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
fun forceStatusBarTranslucent(isStatusBarTranslucent: Boolean) {
if (active && this.isStatusBarTranslucent != isStatusBarTranslucent) {
this.isStatusBarTranslucent = isStatusBarTranslucent
- this.setupWindowInsets()
+ // this.setupWindowInsets()
this.requestApplyInsetsWhenAttached()
}
}
// endregion
2 changes: 1 addition & 1 deletion src/components/KeyboardAvoidingView/index.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* The KeyboardAvoidingView is only used on ios
*/
import React from 'react';
import {KeyboardAvoidingView as KeyboardAvoidingViewComponent} from 'react-native';
import {KeyboardAvoidingView as KeyboardAvoidingViewComponent} from 'react-native-keyboard-controller';
import type {KeyboardAvoidingViewProps} from './types';

function KeyboardAvoidingView(props: KeyboardAvoidingViewProps) {
Expand Down
Loading