diff --git a/qt/aqt/data/web/css/editor.scss b/qt/aqt/data/web/css/editor.scss
index 1b4da129f..68cdc6dd5 100644
--- a/qt/aqt/data/web/css/editor.scss
+++ b/qt/aqt/data/web/css/editor.scss
@@ -8,9 +8,14 @@
padding: 5px;
overflow-wrap: break-word;
overflow: auto;
+
+ &:empty::after {
+ content: "\A";
+ white-space: pre;
+ }
}
-.clearfix:after {
+.clearfix::after {
content: "";
display: table;
clear: both;
diff --git a/qt/aqt/data/web/js/editor.ts b/qt/aqt/data/web/js/editor.ts
index aafc63efb..389c556f8 100644
--- a/qt/aqt/data/web/js/editor.ts
+++ b/qt/aqt/data/web/js/editor.ts
@@ -121,11 +121,6 @@ function inPreEnvironment() {
}
function onInput() {
- // empty field?
- if (currentField.innerHTML === "") {
- currentField.innerHTML = "
";
- }
-
// make sure IME changes get saved
triggerKeyTimer();
}
@@ -346,9 +341,6 @@ function setFields(fields) {
for (let i = 0; i < fields.length; i++) {
const n = fields[i][0];
let f = fields[i][1];
- if (!f) {
- f = "
";
- }
txt += `