Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fixed backspace not combining sections if first section is a special …
Browse files Browse the repository at this point in the history
…markup

refs TryGhost/Ghost#10717 (comment)
- avoid triggering special markup delete behaviour when cursor is at the beginning of a section
  • Loading branch information
kevinansfield committed Apr 29, 2019
1 parent 458e0e9 commit 25eae72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/koenig-editor/addon/options/key-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 25eae72

Please sign in to comment.