diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-01-22 15:04:41 -0800 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2024-01-22 15:04:41 -0800 |
commit | d25b17ab19e7373b4463be13b8611997b3f028dd (patch) | |
tree | a4dff6d920f5cb72d1bd9177c2503a8ee7485019 /src/view/com/modals/Modal.web.tsx | |
parent | ad018d8dbd9353af2a66a0b21a232ee3225bbcf8 (diff) | |
parent | d51ad1fec94ef933eafe0e5f58fba810e349494b (diff) | |
download | voidsky-d25b17ab19e7373b4463be13b8611997b3f028dd.tar.zst |
Merge branch 'main' of github.com:bluesky-social/social-app into main
Diffstat (limited to 'src/view/com/modals/Modal.web.tsx')
-rw-r--r-- | src/view/com/modals/Modal.web.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/com/modals/Modal.web.tsx b/src/view/com/modals/Modal.web.tsx index e11e76fcd..d79663746 100644 --- a/src/view/com/modals/Modal.web.tsx +++ b/src/view/com/modals/Modal.web.tsx @@ -3,6 +3,7 @@ import {TouchableWithoutFeedback, StyleSheet, View} from 'react-native' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' import {usePalette} from 'lib/hooks/usePalette' import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' +import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock' import {useModals, useModalControls} from '#/state/modals' import type {Modal as ModalIface} from '#/state/modals' @@ -38,6 +39,7 @@ import * as EmbedConsentModal from './EmbedConsent' export function ModalsContainer() { const {isModalActive, activeModals} = useModals() + useWebBodyScrollLock(isModalActive) if (!isModalActive) { return null @@ -166,7 +168,8 @@ function Modal({modal}: {modal: ModalIface}) { const styles = StyleSheet.create({ mask: { - position: 'absolute', + // @ts-ignore + position: 'fixed', top: 0, left: 0, width: '100%', |