diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js --- a/native/chat/chat-input-bar.react.js +++ b/native/chat/chat-input-bar.react.js @@ -111,6 +111,8 @@ activeThreadSelector, } from '../navigation/nav-selectors.js'; import { NavContext } from '../navigation/navigation-context.js'; +import { OverlayContext } from '../navigation/overlay-context.js'; +import type { OverlayContextType } from '../navigation/overlay-context.js'; import { type NavigationRoute, ChatCameraModalRouteName, @@ -171,6 +173,7 @@ ) => Promise, +navigation: ?ChatNavigationProp<'MessageList'>, +isFocused?: boolean, + +overlayContext: ?OverlayContextType, }; type State = { +text: string, @@ -1253,6 +1256,7 @@ getDefaultTextMessageRules().simpleMarkdownRules, ); const editMessage = useEditMessage(); + const overlayContext = React.useContext(OverlayContext); return ( ); } diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js --- a/native/navigation/overlay-navigator.react.js +++ b/native/navigation/overlay-navigator.react.js @@ -28,6 +28,7 @@ import type { OverlayRouterExtraNavigationHelpers } from './overlay-router.js'; import { scrollBlockingModals, TabNavigatorRouteName } from './route-names.js'; import { isMessageTooltipKey } from '../chat/utils.js'; +import { InputStateContext } from '../input/input-state.js'; export type OverlayNavigationHelpers = { @@ -155,8 +156,17 @@ } return status; }; - const [scrollBlockingModalStatus, setScrollBlockingModalStatus] = + const [rawScrollBlockingModalStatus, setScrollBlockingModalStatus] = React.useState(() => getScrollBlockingModalStatus(scenes)); + + const inputState = React.useContext(InputStateContext); + const scrollBlockingModalStatus = React.useMemo(() => { + if (inputState?.editState.editedMessage !== null) { + return 'closed'; + } + return rawScrollBlockingModalStatus; + }, [inputState?.editState, rawScrollBlockingModalStatus]); + const sceneDataForNewScene = scene => ({ ...scene, context: {