diff --git a/qt/aqt/data/web/css/editor.scss b/qt/aqt/data/web/css/editor.scss index 1b4da129f..69008ed69 100644 --- a/qt/aqt/data/web/css/editor.scss +++ b/qt/aqt/data/web/css/editor.scss @@ -4,7 +4,6 @@ .field { border: 1px solid var(--border); background: var(--frame-bg); - color: var(--text-fg); padding: 5px; overflow-wrap: break-word; overflow: auto; diff --git a/qt/aqt/data/web/js/editor.ts b/qt/aqt/data/web/js/editor.ts index 32bf43947..e0c75a74d 100644 --- a/qt/aqt/data/web/js/editor.ts +++ b/qt/aqt/data/web/js/editor.ts @@ -343,6 +343,11 @@ function onCutOrCopy() { function setFields(fields) { let txt = ""; + // webengine will include the variable after enter+backspace + // if we don't convert it to a literal colour + const color = window + .getComputedStyle(document.documentElement) + .getPropertyValue("--text-fg"); for (let i = 0; i < fields.length; i++) { const n = fields[i][0]; let f = fields[i][1]; @@ -369,6 +374,7 @@ function setFields(fields) { oncut='onCutOrCopy(this);' contentEditable=true class=field + style='color: ${color}' >${f} `;