From: Alexander Ebert Date: Fri, 7 Jan 2022 16:12:36 +0000 (+0100) Subject: Incorrect handling of Shift+Enter inside code blocks X-Git-Tag: 5.4.11_dev_1~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13169060af2e79c325bb59240046e437a65d2488;p=GitHub%2FWoltLab%2FWCF.git Incorrect handling of Shift+Enter inside code blocks See https://www.woltlab.com/community/thread/293723-eingabetaste-erzeugt-weiteren-quellcode-bbcode/ --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.js index c590f1d00e..83c7b3dc93 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.js @@ -5838,6 +5838,11 @@ return this.keydown.onShiftSpace(); } + + // Shift+Enter should always behave like a "regular" Enter keypress inside `
`.
+					if (this.keydown.pre && key === this.keyCode.ENTER) {
+						return this.keydown.onEnter(e);
+					}
 					
 					// on Shift+Enter or Ctrl+Enter
 					if (key === this.keyCode.ENTER && (e.ctrlKey || e.shiftKey)) {