Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Fixed blur for empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
klan committed Mar 8, 2017
1 parent a84e713 commit 2da604c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions markdown-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@
if (editor) {
this.renderMarkdown();
this.set('_editorReady', true);

if (this.markdown) {
this.editor.trigger('focus', {}, this.$.input);
}
}
},

Expand All @@ -214,6 +210,13 @@
*/
renderMarkdown: function() {
// console.log('renderMarkdown: %s', this.markdown);

if (this.markdown) {
this.editor.trigger('focus', {}, this.$.input);
} else {
this.editor.trigger('blur', {}, this.$.input);
}

this.$.marked.markdown = this.markdown;
}

Expand Down

0 comments on commit 2da604c

Please sign in to comment.