From a6f1b42fa83179055f04b8cc7ce5e21de1e5b09e Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Fri, 20 Apr 2018 11:34:17 +0100 Subject: [PATCH] Koenig - Only deselect cards on cursor changes within the doc refs https://github.com/TryGhost/Ghost/issues/9505 - prevents clicks outside of the document canvas from exiting edit mode - useful for cards that include modals because previously any click on a modal would exit edit mode and usually remove the modal from view --- lib/koenig-editor/addon/components/koenig-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/koenig-editor/addon/components/koenig-editor.js b/lib/koenig-editor/addon/components/koenig-editor.js index b9528e35bdf..1b4a6101999 100644 --- a/lib/koenig-editor/addon/components/koenig-editor.js +++ b/lib/koenig-editor/addon/components/koenig-editor.js @@ -520,7 +520,7 @@ export default Component.extend({ } // deselect any selected card because the cursor is no longer on a card - if (this._selectedCard) { + if (this._selectedCard && !editor.range.isBlank) { this.deselectCard(this._selectedCard); }