Skip to content

Commit

Permalink
Exclude from capturing event from TEXTAREA (composer)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldo-expensify committed May 4, 2023
1 parent ac16487 commit 2437e37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/KeyboardShortcutsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ class KeyboardShortcutsModal extends React.Component {
this.unsubscribeCloseEnterModal = KeyboardShortcut.subscribe(closeShortcutEnterModalConfig.shortcutKey, () => {
ModalActions.close();
KeyboardShortcutsActions.hideKeyboardShortcutModal();
}, closeShortcutEnterModalConfig.descriptionKey, closeShortcutEnterModalConfig.modifiers, true, () => !this.props.isShortcutsModalOpen);
}, closeShortcutEnterModalConfig.descriptionKey, closeShortcutEnterModalConfig.modifiers, true, () => !this.props.isShortcutsModalOpen, 0, true, ['TEXTAREA']);

// Intercept arrow up and down keys to prevent scrolling ArrowKeyFocusManager while this modal is open
const arrowUpConfig = CONST.KEYBOARD_SHORTCUTS.ARROW_UP;
this.unsubscribeArrowUpKey = KeyboardShortcut.subscribe(arrowUpConfig.shortcutKey, () => {
}, arrowUpConfig.descriptionKey, arrowUpConfig.modifiers, true, () => !this.props.isShortcutsModalOpen);
}, arrowUpConfig.descriptionKey, arrowUpConfig.modifiers, true, () => !this.props.isShortcutsModalOpen, 0, true, ['TEXTAREA']);

const arrowDownConfig = CONST.KEYBOARD_SHORTCUTS.ARROW_DOWN;
this.unsubscribeArrowDownKey = KeyboardShortcut.subscribe(arrowDownConfig.shortcutKey, () => {
}, arrowDownConfig.descriptionKey, arrowDownConfig.modifiers, true, () => !this.props.isShortcutsModalOpen);
}, arrowDownConfig.descriptionKey, arrowDownConfig.modifiers, true, () => !this.props.isShortcutsModalOpen, 0, true, ['TEXTAREA']);
}

componentWillUnmount() {
Expand Down

0 comments on commit 2437e37

Please sign in to comment.