Skip to content

Commit

Permalink
Blur element focus on destroy, add null/blank demos
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Dec 31, 2015
1 parent 8f83e6d commit 845c041
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/app/mobiledocs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export default {
[]
]
},
'null': null,
blank: '',
inputCard: {
version: '0.2.0',
sections: [
Expand Down
2 changes: 2 additions & 0 deletions demo/app/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<option disabled>Load a new Mobiledoc</option>
<option value='simple'>Simple text content</option>
<option value='empty'>Empty mobiledoc</option>
<option value='null'>Null mobiledoc</option>
<option value='blank'>Blank string</option>
<option value='simpleList'>List example</option>
<option value='simpleCard'>Simple Card</option>
<option value='imageCard'>Image Card</option>
Expand Down
1 change: 1 addition & 0 deletions src/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ class Editor {
this._isDestroyed = true;
if (this.cursor.hasCursor()) {
this.cursor.clearSelection();
this.element.blur();
}
this.removeMutationObserver();
this._mutationObserver = null;
Expand Down

0 comments on commit 845c041

Please sign in to comment.