diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index 198b47cb4259..7c9219c16286 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -83,6 +83,9 @@ type ScreenWrapperProps = { /** Whether to avoid scroll on virtual viewport */ shouldAvoidScrollOnVirtualViewport?: boolean; + /** Whether to use cached virtual viewport height */ + shouldUseCachedViewportHeight?: boolean; + /** * The navigation prop is passed by the navigator. It is used to trigger the onEntryTransitionEnd callback * when the screen transition ends. @@ -115,6 +118,7 @@ function ScreenWrapper( navigation: navigationProp, shouldAvoidScrollOnVirtualViewport = true, shouldShowOfflineIndicatorInWideScreen = false, + shouldUseCachedViewportHeight = false, }: ScreenWrapperProps, ref: ForwardedRef, ) { @@ -127,7 +131,7 @@ function ScreenWrapper( */ const navigationFallback = useNavigation>(); const navigation = navigationProp ?? navigationFallback; - const {windowHeight, isSmallScreenWidth} = useWindowDimensions(shouldEnableMaxHeight); + const {windowHeight, isSmallScreenWidth} = useWindowDimensions(shouldUseCachedViewportHeight); const {initialHeight} = useInitialDimensions(); const styles = useThemeStyles(); const keyboardState = useKeyboardState(); diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index 8efc7d7c6a1e..1a41d0710c5d 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -285,6 +285,7 @@ function WorkspaceInvitePage({ return (