diff --git a/src/Expensify.js b/src/Expensify.js index 1a48abdc57a9..b4a4f341194e 100644 --- a/src/Expensify.js +++ b/src/Expensify.js @@ -27,6 +27,7 @@ import Navigation from './libs/Navigation/Navigation'; import DeeplinkWrapper from './components/DeeplinkWrapper'; import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu'; import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu'; +import KeyboardShortcutsModal from './components/KeyboardShortcutsModal'; // This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection // eslint-disable-next-line no-unused-vars @@ -197,6 +198,7 @@ class Expensify extends PureComponent { {!this.state.isSplashShown && ( <> + { + if (props.isShortcutsModalOpen && props.isVisible) { + // There are modals that can show up on top of these pop-overs, for example, the keyboard shortcut menu, + // if that happens, close the pop-over as if we were clicking outside. + props.onClose(); + return null; + } + if (!props.fullscreen && !props.isSmallScreenWidth) { return createPortal( { } return ( - {this.props.children} )}