mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-] chore: trigger command k from input fields and editors (#4362)
This commit is contained in:
parent
13e6a67321
commit
cc4bb385fe
@ -200,6 +200,11 @@ export const CommandPalette: FC = observer(() => {
|
||||
|
||||
const keyPressed = key.toLowerCase();
|
||||
const cmdClicked = ctrlKey || metaKey;
|
||||
|
||||
if (cmdClicked && keyPressed === "k" && !isAnyModalOpen) {
|
||||
e.preventDefault();
|
||||
toggleCommandPaletteModal(true);
|
||||
}
|
||||
// if on input, textarea or editor, don't do anything
|
||||
if (
|
||||
e.target instanceof HTMLTextAreaElement ||
|
||||
@ -209,10 +214,7 @@ export const CommandPalette: FC = observer(() => {
|
||||
return;
|
||||
|
||||
if (cmdClicked) {
|
||||
if (keyPressed === "k") {
|
||||
e.preventDefault();
|
||||
toggleCommandPaletteModal(true);
|
||||
} else if (keyPressed === "c" && altKey) {
|
||||
if (keyPressed === "c" && altKey) {
|
||||
e.preventDefault();
|
||||
copyIssueUrlToClipboard();
|
||||
} else if (keyPressed === "b") {
|
||||
|
Loading…
Reference in New Issue
Block a user