tts-voice-creator-clone-and.../static
mARTin-B78 3c210df8a4 fix: magazine dropzone opened the file in the browser instead of accepting the drop
Two real bugs, both confirmed live:

1. dragover's preventDefault() was gated on dataTransfer.types including
   'Files' -- during a real OS file drag, Chromium does not reliably
   populate that list synchronously on every dragover event, so the
   condition failed often enough that preventDefault was silently
   skipped. Per the HTML5 DnD spec, an element only becomes a valid drop
   target once dragover (and, in some browsers, dragenter) has been
   cancelled -- without that, the browser falls through to its native
   "open the dropped file" behaviour, which is exactly what was
   reported. Removed the gate entirely; dragenter is now also handled,
   not just dragover.

2. No page-wide safety net existed, so a drop landing even slightly
   outside the dropzone element bubbled to the browser's default action
   uncontested. Added a window-level dragover/drop preventDefault
   installed once regardless of which section is active.

This also explains the "no hover highlight" symptom: the same
gated-preventDefault bug meant dragover never reliably reached the
class-toggle code either.

Verified live: dragenter/dragover/drop each report defaultPrevented,
the highlight class appears on dragenter and clears on drop, the
dropped file populates the hidden input, and a drop dispatched directly
on <body> (simulating one that misses the zone) is also intercepted by
the new window-level guard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 00:11:54 +02:00
..
css refactor: extract audiobook stylesheet 2026-09-04 11:44:55 +02:00
dist feat: expand resource diagnostics 2026-09-04 10:42:08 +02:00
js fix: magazine dropzone opened the file in the browser instead of accepting the drop 2026-09-07 00:11:54 +02:00
samples chore: release 1.21.0 - Consistent ComfyUI Character Renders and Audiobook Export 2026-08-23 09:12:57 +02:00
sections feat: add drag-and-drop dropzone to the magazine upload form 2026-09-07 00:03:01 +02:00
vendor Add skeleton loading, self-host assets, fix LLM empty response 2026-05-29 17:28:42 +02:00
icon.svg Release v1.6.0: a11y (WCAG AA), i18n (DE), PWA, perf, tests, Cast UX 2026-06-03 14:23:35 +02:00
index.html feat: add magazine reader frontend (P1) 2026-09-06 15:00:58 +02:00
loader.js feat: add magazine reader frontend (P1) 2026-09-06 15:00:58 +02:00
manifest.webmanifest Release v1.6.0: a11y (WCAG AA), i18n (DE), PWA, perf, tests, Cast UX 2026-06-03 14:23:35 +02:00
module-manifest.json feat: add magazine reader frontend (P1) 2026-09-06 15:00:58 +02:00
nav.js feat: add magazine reader frontend (P1) 2026-09-06 15:00:58 +02:00
style.css feat: add drag-and-drop dropzone to the magazine upload form 2026-09-07 00:03:01 +02:00
sw.js Add unified Studio casting workflow and fix voice/casting pipeline bugs 2026-07-26 02:03:56 +02:00