Browse Source

fix: block is copied when editing a block

Ahmad Kholid 3 years ago
parent
commit
e5e549e510
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/newtab/pages/workflows/[id].vue

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

@@ -714,8 +714,8 @@ function pasteCopiedElements(position) {
   editor.value.addEdges(edges);
 }
 function onKeydown({ ctrlKey, metaKey, key, target }) {
-  const els = ['INPUT', 'SELECT'];
-  if (els.includes(target.tagName)) return;
+  const els = ['INPUT', 'SELECT', 'TEXTAREA'];
+  if (els.includes(target.tagName) || target.isContentEditable) return;
 
   const command = (keyName) => (ctrlKey || metaKey) && keyName === key;