diff --git a/static/js/app.js b/static/js/app.js index 522f763..e8f8d58 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -2199,6 +2199,13 @@ function bookFileSelected(input) { function initBookDropZone() { const zone = $('book-drop-zone'); + + // Prevent Firefox from opening dragged files when dropped outside the zone + document.addEventListener('dragover', e => e.preventDefault()); + document.addEventListener('drop', e => { + if (!zone || !zone.contains(e.target)) e.preventDefault(); + }); + if (!zone) return; zone.addEventListener('dragover', e => {