@@ -18,7 +18,7 @@ import {
18
18
} from 'react-native-gesture-handler' ;
19
19
import { Spacings , Colors , BorderRadiuses } from '../../style' ;
20
20
import { useDidUpdate } from '../../hooks' ;
21
- import { asBaseComponent } from '../../commons/new' ;
21
+ import { asBaseComponent , Constants } from '../../commons/new' ;
22
22
import View from '../../components/view' ;
23
23
import Modal from '../../components/modal' ;
24
24
import { extractAlignmentsValues } from '../../commons/modifiers' ;
@@ -113,7 +113,7 @@ const Dialog = (props: DialogProps, ref: ForwardedRef<DialogImperativeMethods>)
113
113
if ( wasMeasured ) {
114
114
if ( modalVisibility ) {
115
115
open ( ) ;
116
- } else {
116
+ } else if ( Constants . isAndroid ) {
117
117
onDismiss ?.( ) ;
118
118
}
119
119
}
@@ -217,10 +217,6 @@ const Dialog = (props: DialogProps, ref: ForwardedRef<DialogImperativeMethods>)
217
217
< View testID = { `${ testID } .overlayFadingBackground` } absF reanimated style = { overlayStyle } pointerEvents = "none" />
218
218
) ;
219
219
220
- if ( ! modalVisibility ) {
221
- return null ;
222
- }
223
-
224
220
return (
225
221
< Modal
226
222
transparent
@@ -231,7 +227,7 @@ const Dialog = (props: DialogProps, ref: ForwardedRef<DialogImperativeMethods>)
231
227
visible = { modalVisibility }
232
228
onBackgroundPress = { ignoreBackgroundPress ? undefined : close }
233
229
onRequestClose = { ignoreBackgroundPress ? undefined : close }
234
- onDismiss = { undefined }
230
+ onDismiss = { onDismiss }
235
231
>
236
232
{ renderOverlayView ( ) }
237
233
< View useSafeArea = { useSafeArea } pointerEvents = { 'box-none' } style = { alignmentStyle } >
0 commit comments