Skip to content

Commit 2e98bdc

Browse files
committed
fix default browser behavior
1 parent 970049b commit 2e98bdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/docImageClient.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export function DocImageClient({
2323
style,
2424
className,
2525
}: DocImageClientProps) {
26-
const handleContextMenu = (_e: React.MouseEvent) => {
26+
const handleContextMenu = (e: React.MouseEvent) => {
27+
e.preventDefault(); // Prevent default context menu
2728
// Allow right-click to open in new tab
2829
const link = document.createElement('a');
2930
link.href = imgPath;

0 commit comments

Comments
 (0)