From 5c6694950dc86971ae373d1cfd322fdb09f1e8b7 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 14 Jan 2021 13:32:30 +0100 Subject: [PATCH] Prefer
over
--- qt/aqt/data/web/js/editor.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qt/aqt/data/web/js/editor.ts b/qt/aqt/data/web/js/editor.ts index bb6695044..e6b4cc21a 100644 --- a/qt/aqt/data/web/js/editor.ts +++ b/qt/aqt/data/web/js/editor.ts @@ -55,6 +55,13 @@ function onKey(evt: KeyboardEvent) { return; } + // prefer
instead of
+ if (evt.which === 13) { + evt.preventDefault(); + document.execCommand("insertLineBreak"); + return; + } + // fix Ctrl+right/left handling in RTL fields if (currentField.dir === "rtl") { const selection = window.getSelection();