From 7cb0886b3567e762d1d3ee64fc528637bdc268da Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 30 Jul 2019 21:21:10 +0200 Subject: [PATCH] Prevent markdown editor from stealing input focus on enter --- src/Umbraco.Web.UI.Client/lib/markdown/markdown.editor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/lib/markdown/markdown.editor.js b/src/Umbraco.Web.UI.Client/lib/markdown/markdown.editor.js index e1617d8365..a75a7f1f3c 100644 --- a/src/Umbraco.Web.UI.Client/lib/markdown/markdown.editor.js +++ b/src/Umbraco.Web.UI.Client/lib/markdown/markdown.editor.js @@ -1239,6 +1239,11 @@ // Perform the button's action. function doClick(button) { + // don't do anything if the editor input or button bar isn't the currently active element + if (document.activeElement !== panels.input && !panels.buttonBar.contains(document.activeElement)) { + return; + } + inputBox.focus(); if (button.textOp) {