diff options
Diffstat (limited to 'src/view/shell/index.web.tsx')
-rw-r--r-- | src/view/shell/index.web.tsx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index 1ada883c9..76f4f5c9b 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -15,6 +15,7 @@ import {useAuxClick} from 'lib/hooks/useAuxClick' import {t} from '@lingui/macro' import {useIsDrawerOpen, useSetDrawerOpen} from '#/state/shell' import {useCloseAllActiveElements} from '#/state/util' +import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock' import {Outlet as PortalOutlet} from '#/components/Portal' function ShellInner() { @@ -24,6 +25,7 @@ function ShellInner() { const navigator = useNavigation<NavigationProp>() const closeAllActiveElements = useCloseAllActiveElements() + useWebBodyScrollLock(isDrawerOpen) useAuxClick() useEffect(() => { @@ -34,12 +36,10 @@ function ShellInner() { }, [navigator, closeAllActiveElements]) return ( - <View style={[s.hContentRegion, {overflow: 'hidden'}]}> - <View style={s.hContentRegion}> - <ErrorBoundary> - <FlatNavigator /> - </ErrorBoundary> - </View> + <> + <ErrorBoundary> + <FlatNavigator /> + </ErrorBoundary> <Composer winHeight={0} /> <ModalsContainer /> <PortalOutlet /> @@ -55,7 +55,7 @@ function ShellInner() { </View> </TouchableOpacity> )} - </View> + </> ) } @@ -78,7 +78,8 @@ const styles = StyleSheet.create({ backgroundColor: colors.black, // TODO }, drawerMask: { - position: 'absolute', + // @ts-ignore web only + position: 'fixed', width: '100%', height: '100%', top: 0, @@ -87,7 +88,8 @@ const styles = StyleSheet.create({ }, drawerContainer: { display: 'flex', - position: 'absolute', + // @ts-ignore web only + position: 'fixed', top: 0, left: 0, height: '100%', |