Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Disable viewer shortcuts in text fields

Anand Baburajan6c1f84951c9f
diff --git a/web/apps/space/src/components/SpaceFileViewer.tsx b/web/apps/space/src/components/SpaceFileViewer.tsx
index f04e73a5f4..7509d46e42 100644
--- a/web/apps/space/src/components/SpaceFileViewer.tsx
+++ b/web/apps/space/src/components/SpaceFileViewer.tsx
@@ -1125,6 +1125,11 @@ export const SpaceFileViewer: React.FC<SpaceFileViewerProps> = ({
onPhotoIndexChangeRef.current?.(nextIndex);
}
});
+ pswp.on("keydown", (event) => {
+ if (event.originalEvent.target instanceof HTMLTextAreaElement) {
+ event.preventDefault();
+ }
+ });
pswp.on("pointerDown", ({ originalEvent }) => {
if (isSwipeBlockedRef.current) return;
if (