Procházet zdrojové kódy

fix: copy blocks not working

Ahmad Kholid před 2 roky
rodič
revize
6aa62530c0
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  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;