Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(desktop): the drop fix reaches Windows and macOS too

Davidc3c7931ee975
diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json
index 674ec882..e3c5c9ff 100644
--- a/src-tauri/tauri.macos.conf.json
+++ b/src-tauri/tauri.macos.conf.json
@@ -12,7 +12,8 @@
"decorations": true,
"transparent": false,
"titleBarStyle": "Overlay",
- "hiddenTitle": true
+ "hiddenTitle": true,
+ "dragDropEnabled": false
}
]
}
diff --git a/src-tauri/tauri.windows.conf.json b/src-tauri/tauri.windows.conf.json
index d77850e5..a9b290a3 100644
--- a/src-tauri/tauri.windows.conf.json
+++ b/src-tauri/tauri.windows.conf.json
@@ -11,7 +11,8 @@
"fullscreen": false,
"visible": false,
"decorations": false,
- "transparent": true
+ "transparent": true,
+ "dragDropEnabled": false
}
]
}
diff --git a/src/lib/__tests__/html5-drop-enabled.test.ts b/src/lib/__tests__/html5-drop-enabled.test.ts
index 90f3195c..3b880a33 100644
--- a/src/lib/__tests__/html5-drop-enabled.test.ts
+++ b/src/lib/__tests__/html5-drop-enabled.test.ts
@@ -48,6 +48,38 @@ describe('the webview keeps its own drag and drop', () => {
})
})
+describe('the platform configs do not undo it', () => {
+ // Measured on the Windows box on 2026-08-15 against the installed 2.6.5:
+ // a real OLE drop of three PNGs onto the training board produced zero HTML5
+ // events in the page and a full set of `tauri://drag-enter`, `drag-over`,
+ // `drag-drop` instead. So Tauri still owned the drop, on the very platform
+ // the fix was written for.
+ //
+ // The reason is the merge rule. Tauri layers tauri.<platform>.conf.json over
+ // the base config, and `windows` is an array: the platform file REPLACES it,
+ // it does not merge field by field. tauri.windows.conf.json and
+ // tauri.macos.conf.json each declare their own window object, so the base
+ // value never reached either of them. Only Linux, which declares no window,
+ // inherited the fix. A setting that only survives on the platform nobody
+ // reported is not a fix, so every config that declares a window has to carry
+ // the flag itself.
+ const platform = readdirSync(join(root, 'src-tauri'))
+ .filter((f) => /^tauri\..+\.conf\.json$/.test(f))
+ .map((f) => [f, JSON.parse(readFileSync(join(root, 'src-tauri', f), 'utf8'))] as const)
+
+ it('there is at least one platform config, or this guard is asleep', () => {
+ expect(platform.length).toBeGreaterThan(0)
+ })
+
+ for (const [name, cfg] of platform) {
+ it(`${name} does not hand drag and drop back to Tauri`, () => {
+ const wins = cfg?.app?.windows
+ if (!wins) return // declares no window, inherits the base value
+ for (const w of wins) expect(w.dragDropEnabled).toBe(false)
+ })
+ }
+})
+
describe('the assumptions that make it safe', () => {
it('the frontend really does use HTML5 drops, so the setting earns its place', () => {
const zones: string[] = []