Open littlehome-eugene opened 5 years ago
@littlehome-eugene seeing the same problem, have you found a solution?
I have the same issue. Any solutions yet?
Looks like the issue is on the react-native-keyboard-tracking-view and is happen when you are using the component in an app with TabBar
One Workaround is to not hide the TabBar on the screens when you are using this component.
Applying the changes on lib/KeyboardTrackingViewManager.m file from this PR fixed the issue on my case.
To not losing the changes with new installs, I used patch-package library. The patch looks like this:
diff --git a/node_modules/react-native-keyboard-tracking-view/lib/KeyboardTrackingViewManager.m b/node_modules/react-native-keyboard-tracking-view/lib/KeyboardTrackingViewManager.m
index 800bd35..a20a595 100644
--- a/node_modules/react-native-keyboard-tracking-view/lib/KeyboardTrackingViewManager.m
+++ b/node_modules/react-native-keyboard-tracking-view/lib/KeyboardTrackingViewManager.m
@@ -501,12 +501,24 @@ - (void) rctContentDidAppearNotification:(NSNotification*)notification
});
}
+-(CGFloat)getTabBarHeight {
+ UITabBarController *tabBarController = (UITabBarController *)[[[UIApplication sharedApplication] delegate] window].rootViewController;
+ CGFloat tabbarHeight = 0.0f;
+
+ if (!tabBarController.tabBar.isHidden) {
+ tabbarHeight = tabBarController.tabBar.bounds.size.height;
+ }
+
+ return tabbarHeight;
+}
+
#pragma mark - ObservingInputAccessoryViewDelegate methods
-(void)updateTransformAndInsets
{
CGFloat bottomSafeArea = [self getBottomSafeArea];
- CGFloat accessoryTranslation = MIN(-bottomSafeArea, -_observingInputAccessoryView.keyboardHeight);
+ CGFloat tabBarHeight = [self getTabBarHeight];
+ CGFloat accessoryTranslation = MIN(-bottomSafeArea, -(_observingInputAccessoryView.keyboardHeight - tabBarHeight));
if (_observingInputAccessoryView.keyboardHeight <= bottomSafeArea) {
_bottomViewHeight = kBottomViewHeight;
Having this issue as well. The screen is in a tab navigator but the tab bar is hidden for this particular screen
When we activate the keyboard, there is a space between accessory view and the keyboard.
What might cause this?