Commit ae04fea
[v2] fix: simplify DragAndDrop fix - remove OnDomReady suppression
The previous fix was over-engineered. It suppressed OnDomReady events
on all platforms to prevent multiple calls during file drops. However,
users may have legitimate use cases for OnDomReady being called on
navigation/reload.
This simplified fix:
- Keeps the JavaScript setup() that runs on each DOM load to register
drag handlers early (preventing browser navigation on file drops)
- Keeps the Windows AllowExternalDrag fix for EnableFileDrop+DisableWebViewDrop
- Removes the OnDomReady suppression on macOS, Linux, and Windows
The core insight is that by preventing browser navigation on file drops
via JavaScript, the page won't reload, so OnDomReady won't fire extra
times in the problematic scenario anyway.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 7ddb49b commit ae04fea
7 files changed
Lines changed: 10 additions & 40 deletions
File tree
- v2/internal/frontend
- desktop
- darwin
- linux
- windows
- runtime
- desktop
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
| 476 | + | |
482 | 477 | | |
483 | 478 | | |
484 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | 472 | | |
476 | 473 | | |
477 | 474 | | |
478 | 475 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
| 476 | + | |
486 | 477 | | |
487 | 478 | | |
488 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
910 | 914 | | |
911 | 915 | | |
912 | 916 | | |
| |||
920 | 924 | | |
921 | 925 | | |
922 | 926 | | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | 927 | | |
930 | 928 | | |
931 | 929 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 249 | | |
254 | 250 | | |
255 | 251 | | |
| |||
277 | 273 | | |
278 | 274 | | |
279 | 275 | | |
280 | | - | |
| 276 | + | |
281 | 277 | | |
282 | 278 | | |
283 | 279 | | |
| 280 | + | |
284 | 281 | | |
285 | 282 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | 283 | | |
291 | 284 | | |
292 | 285 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments