Skip to content

Commit

Permalink
Koenig - Only deselect cards on cursor changes within the doc
Browse files Browse the repository at this point in the history
refs TryGhost/Ghost#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
  • Loading branch information
kevinansfield committed Apr 20, 2018
1 parent c1e7630 commit 9064cff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/koenig-editor/addon/components/koenig-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9064cff

Please sign in to comment.