diff --git a/interface/app/$libraryId/Explorer/View/ViewItem.tsx b/interface/app/$libraryId/Explorer/View/ViewItem.tsx index d1ba7156ce0b..2537b854ff01 100644 --- a/interface/app/$libraryId/Explorer/View/ViewItem.tsx +++ b/interface/app/$libraryId/Explorer/View/ViewItem.tsx @@ -1,4 +1,4 @@ -import { useCallback, type HTMLAttributes, type PropsWithChildren } from 'react'; +import { useCallback, useEffect, type HTMLAttributes, type PropsWithChildren } from 'react'; import { createSearchParams, useNavigate, @@ -215,6 +215,17 @@ export const ViewItem = ({ data, children, ...props }: ViewItemProps) => { const { doubleClick } = useViewItemDoubleClick(); + useEffect(() => { + const handleContextMenu = (e: MouseEvent) => { + e.preventDefault(); + }; + + document.addEventListener('contextmenu', handleContextMenu); + return () => { + document.removeEventListener('contextmenu', handleContextMenu); + }; + }, []); + return (