diff --git a/aqt/editor.py b/aqt/editor.py
index 32538601b..78f489d62 100644
--- a/aqt/editor.py
+++ b/aqt/editor.py
@@ -120,6 +120,20 @@ function setFields(fields) {
$("#fields").html("
");
$("#f0").focus();
};
+
+$(function () {
+ // ignore drops outside the editable area
+ document.body.ondragover = function () {
+ e = window.event.srcElement;
+ do {
+ if (e.contentEditable == "true") {
+ return;
+ }
+ e = window.parentNode;
+ } while (e);
+ window.event.preventDefault();
+ }
+});