From 3adcad4ca3278dfff5f9dcf42a9343f84dba0b62 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Mon, 19 Apr 2021 16:09:25 +0200 Subject: [PATCH] Don't use
s when inside of paragraph --- ts/editor/inputHandlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/editor/inputHandlers.ts b/ts/editor/inputHandlers.ts index a5786ffaf..8864aa26b 100644 --- a/ts/editor/inputHandlers.ts +++ b/ts/editor/inputHandlers.ts @@ -51,7 +51,7 @@ export function onKey(evt: KeyboardEvent): void { } // prefer
instead of
- if (evt.code === "Enter" && !getListItem(currentField)) { + if (evt.code === "Enter" && !getListItem(currentField) && !getParagraph(currentField)) { evt.preventDefault(); document.execCommand("insertLineBreak"); }