[WEB-1801] fix: avoid opening shortcut guide on editors / input elements. (#5025)
This commit is contained in:
parent
0363057d9c
commit
db722d580f
1 changed files with 5 additions and 4 deletions
|
|
@ -206,10 +206,6 @@ export const CommandPalette: FC = observer(() => {
|
|||
toggleCommandPaletteModal(true);
|
||||
}
|
||||
|
||||
if (shiftClicked && (keyPressed === "?" || keyPressed === "/") && !isAnyModalOpen) {
|
||||
e.preventDefault();
|
||||
toggleShortcutModal(true);
|
||||
}
|
||||
// if on input, textarea or editor, don't do anything
|
||||
if (
|
||||
e.target instanceof HTMLTextAreaElement ||
|
||||
|
|
@ -218,6 +214,11 @@ export const CommandPalette: FC = observer(() => {
|
|||
)
|
||||
return;
|
||||
|
||||
if (shiftClicked && (keyPressed === "?" || keyPressed === "/") && !isAnyModalOpen) {
|
||||
e.preventDefault();
|
||||
toggleShortcutModal(true);
|
||||
}
|
||||
|
||||
if (cmdClicked) {
|
||||
if (keyPressed === "c" && ((platform === "MacOS" && ctrlKey) || altKey)) {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue