Prechádzať zdrojové kódy

fix: copy blocks not working

Ahmad Kholid 2 rokov pred
rodič
commit
6aa62530c0
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      src/newtab/pages/workflows/[id].vue

+ 4 - 2
src/newtab/pages/workflows/[id].vue

@@ -1510,12 +1510,14 @@ function undoRedoCommand(type, { target }) {
 
   executeCommand(type);
 }
-function onKeydown({ ctrlKey, metaKey, shiftKey, key, target }) {
+function onKeydown({ ctrlKey, metaKey, shiftKey, key, target, repeat }) {
+  if (repeat) return;
+
   const els = ['INPUT', 'SELECT', 'TEXTAREA'];
   if (
     els.includes(target.tagName) ||
     target.isContentEditable ||
-    !target.classList.contains('workflow-editor')
+    !target.closest('.workflow-editor')
   )
     return;