From 7a5cbfdfba2ad1592ed32d7311894e3dd8ab7739 Mon Sep 17 00:00:00 2001 From: Ategon Date: Mon, 10 Feb 2025 21:12:33 -0500 Subject: [PATCH] Fix chromium opening images in a new tab --- src/components/editor/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/editor/index.tsx b/src/components/editor/index.tsx index 39fe776..14abeca 100644 --- a/src/components/editor/index.tsx +++ b/src/components/editor/index.tsx @@ -121,6 +121,8 @@ export default function Editor({ event.dataTransfer.files && event.dataTransfer.files[0] ) { + event.preventDefault(); + const file = event.dataTransfer.files[0]; const filesize = parseInt((file.size / 1024 / 1024).toFixed(4));