From dcd76b5a5ea02ab1fce18d0150132bf544c8a65d 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 --- ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js index b9528e35bd..1b4a610199 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js +++ b/ghost/admin/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); }