diff options
Diffstat (limited to 'loggedin.js')
-rw-r--r-- | loggedin.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/loggedin.js b/loggedin.js index b7b0f0e..aa40843 100644 --- a/loggedin.js +++ b/loggedin.js @@ -551,6 +551,7 @@ function begin_drag_fileview(e, fileview) { // Start dragging the 'obj' DOM element // e is a DOM event, this should only get called in response of a DOM event function begin_drag(e, obj, dont_set_width) { + set_iframe_enabled(false); dragging = obj; dragging_candidate = null; dragging.classList.add("dragged"); @@ -575,6 +576,8 @@ function begin_drag(e, obj, dont_set_width) { } function end_drag(_e) { + set_iframe_enabled(true); + // If there's a dragging palceholder remove it and put the dragged node back into its place if (dragging_placeholder) { dragging_placeholder.parentNode.insertBefore(dragging, dragging_placeholder); @@ -1132,4 +1135,9 @@ document.body.oncontextmenu = (e) => { the_file.onchange = (e) => { on_file_added(e); }; +function set_iframe_enabled(en) { + for (const iframe of document.getElementsByTagName('iframe')) + iframe.hidden = !en; +} + main(); |