From 526411ab25c66f787e9e702ef26240a165c45a61 Mon Sep 17 00:00:00 2001
From: Mary <pineapplecreamcheese@skiff.com>
Date: Sun, 21 Jan 2024 04:34:29 +0700
Subject: fix: firefox edge-case

---
 src/view/com/composer/text-input/TextInput.web.tsx | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'src/view/com/composer/text-input/TextInput.web.tsx')

diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx
index db1b6b6f4..8898ab977 100644
--- a/src/view/com/composer/text-input/TextInput.web.tsx
+++ b/src/view/com/composer/text-input/TextInput.web.tsx
@@ -123,20 +123,17 @@ export const TextInput = React.forwardRef(function TextInputImpl(
       event.preventDefault()
       setIsDropping(false)
     }
-    const handleDragOver = (event: DragEvent) => {
-      event.preventDefault()
-    }
 
     document.body.addEventListener('drop', handleDrop)
     document.body.addEventListener('dragenter', handleDragEnter)
+    document.body.addEventListener('dragover', handleDragEnter)
     document.body.addEventListener('dragleave', handleDragLeave)
-    document.body.addEventListener('dragover', handleDragOver)
 
     return () => {
       document.body.removeEventListener('drop', handleDrop)
       document.body.removeEventListener('dragenter', handleDragEnter)
+      document.body.removeEventListener('dragover', handleDragEnter)
       document.body.removeEventListener('dragleave', handleDragLeave)
-      document.body.removeEventListener('dragover', handleDragOver)
     }
   }, [setIsDropping])
 
-- 
cgit 1.4.1

