Pārlūkot izejas kodu

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

Harry Tran 2 gadi atpakaļ
vecāks
revīzija
48c9cfb432

+ 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();
     }