Skip to content

Commit

Permalink
Merge pull request #18484 from azimgd/shortcut-modal-check
Browse files Browse the repository at this point in the history
prevent closing shortcut modal by triggering open shortcut
  • Loading branch information
luacmartins authored May 8, 2023
2 parents 8f9c7be + d280007 commit d4ed233
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/KeyboardShortcutsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class KeyboardShortcutsModal extends React.Component {

const openShortcutModalConfig = CONST.KEYBOARD_SHORTCUTS.SHORTCUT_MODAL;
this.unsubscribeShortcutModal = KeyboardShortcut.subscribe(openShortcutModalConfig.shortcutKey, () => {
if (this.props.isShortcutsModalOpen) {
return;
}

ModalActions.close();
KeyboardShortcutsActions.showKeyboardShortcutModal();
}, openShortcutModalConfig.descriptionKey, openShortcutModalConfig.modifiers, true);
Expand Down

0 comments on commit d4ed233

Please sign in to comment.