Skip to content

Commit

Permalink
Merge pull request Expensify#42738 from tsa321/attchview_backbutton
Browse files Browse the repository at this point in the history
Fix back button arrow won't back when viewing attachment image and additional fixes on modals
  • Loading branch information
dangrous authored Jun 5, 2024
2 parents 6599144 + 29992cf commit e94199c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import SilentCommentUpdater from '@pages/home/report/ReportActionCompose/SilentC
import Suggestions from '@pages/home/report/ReportActionCompose/Suggestions';
import * as EmojiPickerActions from '@userActions/EmojiPickerAction';
import * as InputFocus from '@userActions/InputFocus';
import * as Modal from '@userActions/Modal';
import * as Report from '@userActions/Report';
import * as User from '@userActions/User';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -285,7 +286,11 @@ function ComposerWithSuggestions(

const parentReportAction = parentReportActions?.[parentReportActionID ?? ''] ?? null;
const shouldAutoFocus =
!modal?.isVisible && isFocused && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;
!modal?.isVisible &&
Modal.areAllModalsHidden() &&
isFocused &&
(shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) &&
shouldShowComposeInput;

const valueRef = useRef(value);
valueRef.current = value;
Expand Down

0 comments on commit e94199c

Please sign in to comment.