Fixed bug in Safari/Chrome in which hiding an empty note caused it to get saved and end up in the "recent updates".
This commit is contained in:
parent
0d371cc490
commit
5944d1f20d
|
@ -521,17 +521,17 @@ Editor.prototype.blurred = function () {
|
|||
this.scrape_title();
|
||||
}
|
||||
|
||||
Editor.title_placeholder_char = "\u200b";
|
||||
Editor.title_placeholder_pattern = /\u200b/g;
|
||||
Editor.title_placeholder_html = "​​";
|
||||
|
||||
Editor.prototype.empty = function () {
|
||||
if ( !this.document || !this.document.body )
|
||||
return true; // consider it empty as of now
|
||||
|
||||
return ( scrapeText( this.document.body ).length == 0 );
|
||||
return ( scrapeText( this.document.body ).replace( Editor.title_placeholder_pattern, "" ).length == 0 );
|
||||
}
|
||||
|
||||
Editor.title_placeholder_char = "\u200b";
|
||||
Editor.title_placeholder_pattern = /\u200b/g;
|
||||
Editor.title_placeholder_html = "​​";
|
||||
|
||||
Editor.prototype.insert_link = function ( url ) {
|
||||
// get the current selection, which is the link title
|
||||
if ( this.iframe.contentWindow && this.iframe.contentWindow.getSelection ) { // browsers such as Firefox
|
||||
|
|
Reference in New Issue