From a89cc44199ed3ba2ee051172e8581f55f9c3f413 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 29 Apr 2019 14:25:59 +0200 Subject: [PATCH] Fixed backspace not combining sections if first section is a special markup refs https://github.com/TryGhost/Ghost/issues/10717#issuecomment-487557026 - avoid triggering special markup delete behaviour when cursor is at the beginning of a section --- ghost/admin/lib/koenig-editor/addon/options/key-commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/lib/koenig-editor/addon/options/key-commands.js b/ghost/admin/lib/koenig-editor/addon/options/key-commands.js index 644b7d7f89..f86a213fe6 100644 --- a/ghost/admin/lib/koenig-editor/addon/options/key-commands.js +++ b/ghost/admin/lib/koenig-editor/addon/options/key-commands.js @@ -178,7 +178,7 @@ export const DEFAULT_KEY_COMMANDS = [{ // if the markup about to be deleted is a special format (code, strike) // then undo the text expansion to allow it to be extended - if (isCollapsed && marker) { + if (isCollapsed && marker && offset !== 0) { let specialMarkupTagNames = Object.keys(SPECIAL_MARKUPS); let hasReversed = false; specialMarkupTagNames.forEach((tagName) => {