Преглед на файлове

fix(web): remove processing key events in photo viewer window (#3238)

Harry Tran преди 2 години
родител
ревизия
48c9cfb432
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      web/src/lib/components/asset-viewer/photo-viewer.svelte

+ 3 - 0
web/src/lib/components/asset-viewer/photo-viewer.svelte

@@ -45,6 +45,9 @@
   };
 
   const handleKeypress = async ({ metaKey, ctrlKey, key }: KeyboardEvent) => {
+    if (window.getSelection()?.type === 'Range') {
+      return;
+    }
     if ((metaKey || ctrlKey) && key === 'c') {
       await doCopy();
     }