diff --git a/aqt/editor.py b/aqt/editor.py
index 2f3158311..33016c6ff 100644
--- a/aqt/editor.py
+++ b/aqt/editor.py
@@ -86,16 +86,15 @@ function onKey() {
return;
}
clearChangeTimer();
- if (currentField.innerHTML == "
") {
- // fix empty div bug. slight flicker, but must be done in a timer
- changeTimer = setTimeout(function () {
- currentField.innerHTML = "
";
+ changeTimer = setTimeout(function () {
updateButtonState();
- saveField("key"); }, 1);
- } else {
- changeTimer = setTimeout(function () {
- updateButtonState();
- saveField("key"); }, 600);
+ saveField("key");
+ }, 600);
+};
+
+function checkForEmptyField() {
+ if (currentField.innerHTML == "") {
+ currentField.innerHTML = "
";
}
};
@@ -240,7 +239,7 @@ function setFields(fields, focusTo) {
f = "
";
}
txt += "{0} |
".format(n);
- txt += " {0} ".format(f);
|