From ccba7e8f757dbcdba403d6faf4b1c21adba98663 Mon Sep 17 00:00:00 2001 From: Calin-Teodor Date: Mon, 1 Aug 2022 12:16:13 +0300 Subject: [PATCH] feat(base/modal): renamed prop and fixed scroll inside webview --- .../modal/components/JitsiKeyboardAvoidingView.js | 14 +++++++------- .../features/base/modal/components/JitsiScreen.js | 14 +++++++------- .../base/modal/components/JitsiScreenWebView.js | 1 + react/features/chat/components/native/Chat.js | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/react/features/base/modal/components/JitsiKeyboardAvoidingView.js b/react/features/base/modal/components/JitsiKeyboardAvoidingView.js index 483c0ea75..b0bfb98c0 100644 --- a/react/features/base/modal/components/JitsiKeyboardAvoidingView.js +++ b/react/features/base/modal/components/JitsiKeyboardAvoidingView.js @@ -24,6 +24,11 @@ type Props = { */ contentContainerStyle?: StyleType, + /** + * Disable forced keyboard dismiss? + */ + disableForcedKeyboardDismiss?: boolean, + /** * Is a text input rendered at the bottom of the screen? */ @@ -34,11 +39,6 @@ type Props = { */ hasTabNavigator: boolean, - /** - * Is the keyboard already dismissible? - */ - keyboardAlreadyDismissible?: boolean, - /** * Additional style to be appended to the KeyboardAvoidingView. */ @@ -51,7 +51,7 @@ const JitsiKeyboardAvoidingView = ( contentContainerStyle, hasTabNavigator, hasBottomTextInput, - keyboardAlreadyDismissible, + disableForcedKeyboardDismiss, style }: Props) => { const headerHeight = useHeaderHeight(); @@ -74,7 +74,7 @@ const JitsiKeyboardAvoidingView = ( ? headerHeight + StatusBar.currentHeight : headerHeight; // Tells the view what to do with taps - const shouldSetResponse = useCallback(() => !keyboardAlreadyDismissible); + const shouldSetResponse = useCallback(() => !disableForcedKeyboardDismiss); const onRelease = useCallback(() => Keyboard.dismiss()); return ( diff --git a/react/features/base/modal/components/JitsiScreen.js b/react/features/base/modal/components/JitsiScreen.js index d273bb872..0fbffed2d 100644 --- a/react/features/base/modal/components/JitsiScreen.js +++ b/react/features/base/modal/components/JitsiScreen.js @@ -22,6 +22,11 @@ type Props = { */ children: React$Node, + /** + * Disabled forced keyboard dismiss? + */ + disableForcedKeyboardDismiss?: boolean, + /** * Optional function that renders a footer component, if needed. */ @@ -37,11 +42,6 @@ type Props = { */ hasTabNavigator?: boolean, - /** - * Is the keyboard already dismissible? - */ - keyboardAlreadyDismissible?: boolean, - /** * Insets for the SafeAreaView. */ @@ -59,7 +59,7 @@ const JitsiScreen = ({ footerComponent, hasTabNavigator = false, hasBottomTextInput = false, - keyboardAlreadyDismissible = false, + disableForcedKeyboardDismiss = false, safeAreaInsets = [ 'left', 'right' ], style }: Props) => ( @@ -67,9 +67,9 @@ const JitsiScreen = ({ style = { styles.jitsiScreenContainer }> ( diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js index 563260328..6746346f0 100644 --- a/react/features/chat/components/native/Chat.js +++ b/react/features/chat/components/native/Chat.js @@ -53,9 +53,9 @@ class Chat extends AbstractChat { return (