diff --git a/src/view/com/Dialog/index.web.tsx b/src/view/com/Dialog/index.web.tsx
index b27c757029..f1576d6f33 100644
--- a/src/view/com/Dialog/index.web.tsx
+++ b/src/view/com/Dialog/index.web.tsx
@@ -4,13 +4,14 @@ import {FocusScope} from '@tamagui/focus-scope'
import Animated, {FadeInDown, FadeIn, FadeOut} from 'react-native-reanimated'
import {useTheme, atoms as a, useBreakpoints} from '#/alf'
-import {EventStopper} from '#/view/com/util/EventStopper'
import {Text} from '#/view/com/Typography'
import {Portal} from '#/view/com/Portal'
import {Button} from '#/view/com/Button'
import {DialogProps, DialogControl} from '#/view/com/Dialog/types'
+const stopPropagation = (e: any) => e.stopPropagation()
+
const Context = React.createContext<{
close: () => void
}>({
@@ -58,6 +59,8 @@ export function Outer({
)
React.useEffect(() => {
+ if (!isOpen) return
+
function handler(e: KeyboardEvent) {
if (e.key === 'Escape') close()
}
@@ -65,7 +68,7 @@ export function Outer({
document.addEventListener('keydown', handler)
return () => document.removeEventListener('keydown', handler)
- }, [close])
+ }, [isOpen, close])
const context = React.useMemo(() => ({close}), [close])
@@ -105,14 +108,20 @@ export function Outer({
paddingTop: gtMobile ? ('10vh' as DimensionValue) : 0,
},
]}>
-
-
- {children}
-
-
+ true}
+ onTouchEnd={stopPropagation}>
+
+
+ {children}
+
+
+
diff --git a/src/view/com/Portal.tsx b/src/view/com/Portal.tsx
index 47a216bd80..1813d9e05e 100644
--- a/src/view/com/Portal.tsx
+++ b/src/view/com/Portal.tsx
@@ -33,8 +33,6 @@ export function Provider(props: React.PropsWithChildren<{}>) {
setOutlet(<>{Object.values(map.current)}>)
}, [])
- console.log(outlet)
-
return (
{props.children}
diff --git a/src/view/screens/DebugNew.tsx b/src/view/screens/DebugNew.tsx
index b6598cf669..24538bcb33 100644
--- a/src/view/screens/DebugNew.tsx
+++ b/src/view/screens/DebugNew.tsx
@@ -334,15 +334,24 @@ function Dialogs() {
-
-
+
+
+
+
>