Page MenuHomePhabricator

D12276.id40840.diff
No OneTemporary

D12276.id40840.diff

diff --git a/native/navigation/community-drawer-navigator.react.js b/native/navigation/community-drawer-navigator.react.js
--- a/native/navigation/community-drawer-navigator.react.js
+++ b/native/navigation/community-drawer-navigator.react.js
@@ -55,6 +55,7 @@
headerShown: false,
swipeEnabled,
swipeEdgeWidth: screenWidth,
+ keyboardDismissMode: 'none',
}),
[styles.drawerStyle, swipeEnabled, screenWidth],
);
diff --git a/native/navigation/tab-navigator.react.js b/native/navigation/tab-navigator.react.js
--- a/native/navigation/tab-navigator.react.js
+++ b/native/navigation/tab-navigator.react.js
@@ -14,11 +14,13 @@
TabAction,
TabRouterOptions,
} from '@react-navigation/core';
+import { useDrawerStatus } from '@react-navigation/drawer';
import {
createNavigatorFactory,
useNavigationBuilder,
} from '@react-navigation/native';
import * as React from 'react';
+import { Keyboard } from 'react-native';
import { unreadCount } from 'lib/selectors/thread-selectors.js';
@@ -202,6 +204,14 @@
[colors.tabBarActiveTintColor, colors.tabBarBackground],
);
+ const drawerStatus = useDrawerStatus();
+ const isDrawerOpen = drawerStatus === 'open';
+ React.useEffect(() => {
+ if (isDrawerOpen) {
+ Keyboard.dismiss();
+ }
+ }, [isDrawerOpen]);
+
return (
<Tab.Navigator
initialRouteName={ChatRouteName}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 7:52 PM (20 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577177
Default Alt Text
D12276.id40840.diff (1 KB)

Event Timeline