@@ -112,7 +112,8 @@ function BaseModal(
112112 // We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to apply correct modal width
113113 const canUseTouchScreen = canUseTouchScreenCheck ( ) ;
114114 // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
115- const { isSmallScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
115+ const { isSmallScreenWidth, shouldUseNarrowLayout, isInNarrowPaneModal} = useResponsiveLayout ( ) ;
116+
116117 const { sidePanelOffset} = useSidePanel ( ) ;
117118 const sidePanelStyle = ! shouldUseReanimatedModal && shouldApplySidePanelOffset && ! isSmallScreenWidth ? { paddingRight : sidePanelOffset . current } : undefined ;
118119 const sidePanelReanimatedStyle =
@@ -344,6 +345,11 @@ function BaseModal(
344345 const { originalValues} = useContext ( ScreenWrapperOfflineIndicatorContext ) ;
345346 const offlineIndicatorContextValue = useMemo ( ( ) => ( isInNarrowPane ? ( originalValues ?? { } ) : { } ) , [ isInNarrowPane , originalValues ] ) ;
346347
348+ const backdropOpacityAdjusted =
349+ hideBackdrop || ( type === CONST . MODAL . MODAL_TYPE . RIGHT_DOCKED && ! isSmallScreenWidth && ( isInNarrowPane || isInNarrowPaneModal ) ) // right_docked modals shouldn't add backdrops when opened in same-width RHP
350+ ? 0
351+ : backdropOpacity ;
352+
347353 return (
348354 < ModalContext . Provider value = { modalContextValue } >
349355 < ScreenWrapperOfflineIndicatorContext . Provider value = { offlineIndicatorContextValue } >
@@ -376,7 +382,7 @@ function BaseModal(
376382 swipeThreshold = { swipeThreshold }
377383 isVisible = { isVisible }
378384 backdropColor = { theme . overlay }
379- backdropOpacity = { ! shouldUseCustomBackdrop && hideBackdrop ? 0 : backdropOpacity }
385+ backdropOpacity = { backdropOpacityAdjusted }
380386 backdropTransitionOutTiming = { 0 }
381387 hasBackdrop = { hasBackdrop ?? fullscreen }
382388 coverScreen = { fullscreen }
0 commit comments