diff --git a/web/libs/datamanager/src/components/MainView/GridView/GridPreview.tsx b/web/libs/datamanager/src/components/MainView/GridView/GridPreview.tsx index 5f565a03d13e..fde106052132 100644 --- a/web/libs/datamanager/src/components/MainView/GridView/GridPreview.tsx +++ b/web/libs/datamanager/src/components/MainView/GridView/GridPreview.tsx @@ -69,6 +69,8 @@ const TaskModal = observer(({ view, tasks, imageField, currentTaskId, setCurrent event.preventDefault(); } else if (event.key === "Escape") { onClose(); + } else if (event.key === "ArrowUp" || event.key === "ArrowDown") { + // prevent Quick View from opening in a background by hotkey } else { // pass this event through for other keys return; @@ -77,7 +79,7 @@ const TaskModal = observer(({ view, tasks, imageField, currentTaskId, setCurrent event.stopPropagation(); }; - document.addEventListener("keydown", onKeyDown); + document.addEventListener("keydown", onKeyDown, { capture: true }); return () => document.removeEventListener("keydown", onKeyDown); }, [goToNext, goToPrev, onSelect, onClose]);