From 118abffdeaa323c391b2e709e46c70bbfc3f3b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Fri, 25 Sep 2026 17:11:17 +0200 Subject: [PATCH] Drop files only into the textarea under the cursor --- crates/radicle-tauri/tauri.conf.json | 3 +- src/components/ExtendedTextarea.svelte | 102 ++++++++++++++--------- src/lib/disableDropNavigation.ts | 25 ++++++ src/main.ts | 2 + tests/e2e/repo/fileDrop.spec.ts | 88 +++++++++++++++++++ tests/unit/disableDropNavigation.test.ts | 77 +++++++++++++++++ 6 files changed, 255 insertions(+), 42 deletions(-) create mode 100644 src/lib/disableDropNavigation.ts create mode 100644 tests/e2e/repo/fileDrop.spec.ts create mode 100644 tests/unit/disableDropNavigation.test.ts diff --git a/crates/radicle-tauri/tauri.conf.json b/crates/radicle-tauri/tauri.conf.json index 5bbf6effd..29c9aab2d 100644 --- a/crates/radicle-tauri/tauri.conf.json +++ b/crates/radicle-tauri/tauri.conf.json @@ -16,7 +16,8 @@ "minWidth": 960, "minHeight": 600, "titleBarStyle": "Overlay", - "hiddenTitle": true + "hiddenTitle": true, + "dragDropEnabled": false } ], "security": { diff --git a/src/components/ExtendedTextarea.svelte b/src/components/ExtendedTextarea.svelte index 5a79bf3be..5aa36530b 100644 --- a/src/components/ExtendedTextarea.svelte +++ b/src/components/ExtendedTextarea.svelte @@ -1,13 +1,10 @@