From 8da69c5d39c0e6a4af9182789c0caa5ed2bd0a4f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 20 May 2020 14:59:22 +1000 Subject: [PATCH] fix HTML editor in add screen --- qt/aqt/editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 730cb356c..1ccd98080 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -537,7 +537,8 @@ class Editor: warnings.simplefilter("ignore", UserWarning) html = str(BeautifulSoup(html, "html.parser")) self.note.fields[field] = html - self.note.flush() + if not self.addMode: + self.note.flush() self.loadNote(focusTo=field) # Tag handling