From 4112b02cd5615025a0df97f4a14d053a2836d02b Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 7 Dec 2023 23:54:17 +0000 Subject: [PATCH] Don't scroll away modal or lightbox --- src/view/com/lightbox/Lightbox.web.tsx | 3 ++- src/view/com/modals/Modal.web.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/view/com/lightbox/Lightbox.web.tsx b/src/view/com/lightbox/Lightbox.web.tsx index 45e1fa5a31..498d5147f5 100644 --- a/src/view/com/lightbox/Lightbox.web.tsx +++ b/src/view/com/lightbox/Lightbox.web.tsx @@ -176,7 +176,8 @@ function LightboxInner({ const styles = StyleSheet.create({ mask: { - position: 'absolute', + // @ts-ignore + position: 'fixed', top: 0, left: 0, width: '100%', diff --git a/src/view/com/modals/Modal.web.tsx b/src/view/com/modals/Modal.web.tsx index 12138f54d4..1510084af4 100644 --- a/src/view/com/modals/Modal.web.tsx +++ b/src/view/com/modals/Modal.web.tsx @@ -159,7 +159,8 @@ function Modal({modal}: {modal: ModalIface}) { const styles = StyleSheet.create({ mask: { - position: 'absolute', + // @ts-ignore + position: 'fixed', top: 0, left: 0, width: '100%',