Prefer <br> over <div></div>

This commit is contained in:
Henrik Giesel 2021-01-14 13:32:30 +01:00
parent 3ebc95d27c
commit 5c6694950d

View file

@ -55,6 +55,13 @@ function onKey(evt: KeyboardEvent) {
return; return;
} }
// prefer <br> instead of <div></div>
if (evt.which === 13) {
evt.preventDefault();
document.execCommand("insertLineBreak");
return;
}
// fix Ctrl+right/left handling in RTL fields // fix Ctrl+right/left handling in RTL fields
if (currentField.dir === "rtl") { if (currentField.dir === "rtl") {
const selection = window.getSelection(); const selection = window.getSelection();