witten
/
luminotes
Archived
1
0
Fork 0

Now blurring in Wiki.editor_focused() for static divs as well (not just iframes).

This commit is contained in:
Dan Helfman 2009-01-13 12:35:41 -08:00
parent f4511a8493
commit 725904ba49
1 changed files with 13 additions and 11 deletions

View File

@ -1019,19 +1019,21 @@ Wiki.prototype.update_link_with_suggestion = function ( editor, link, note ) {
}
Wiki.prototype.editor_focused = function ( editor, synchronous ) {
if ( this.focused_editor && this.focused_editor != editor && this.focused_editor.iframe ) {
this.clear_pulldowns();
if ( this.focused_editor && this.focused_editor != editor ) {
this.focused_editor.blur();
this.clear_pulldowns();
// if the formerly focused editor is completely empty, then remove it as the user leaves it and switches to this editor
if ( this.focused_editor.id == this.blank_editor_id && this.focused_editor.empty() ) {
signal( this, "note_removed", this.focused_editor.id );
this.focused_editor.shutdown();
this.decrement_total_notes_count();
this.display_empty_message();
} else {
// when switching editors, save the one being left
this.save_editor( null, null, null, synchronous );
if ( this.focused_editor.iframe ) {
// if the formerly focused editor is completely empty, then remove it as the user leaves it and switches to this editor
if ( this.focused_editor.id == this.blank_editor_id && this.focused_editor.empty() ) {
signal( this, "note_removed", this.focused_editor.id );
this.focused_editor.shutdown();
this.decrement_total_notes_count();
this.display_empty_message();
} else {
// when switching editors, save the one being left
this.save_editor( null, null, null, synchronous );
}
}
}