witten
/
luminotes
Archived
1
0
Fork 0

Don't blur an iframe as soon as the focus leaves, but rather when another editor is focused. This makes the toolbar work again.

This commit is contained in:
Dan Helfman 2009-01-06 16:28:01 -08:00
parent 087723ebdd
commit b2eaa5a168
2 changed files with 1 additions and 4 deletions

View File

@ -275,12 +275,8 @@ Editor.prototype.finish_init = function () {
connect( this.document, "onkeydown", function ( event ) { self.key_pressed( event ); } );
connect( this.document, "onkeyup", function ( event ) { self.key_released( event ); } );
}
connect( this.iframe, "onblur", function ( event ) { self.blurred( event ); } );
connect( this.document, "onblur", function ( event ) { self.blurred( event ); } );
connect( this.document, "onfocus", function ( event ) { self.focused( event ); } );
connect( this.document.body, "onblur", function ( event ) { self.blurred( event ); } );
connect( this.document.body, "onfocus", function ( event ) { self.focused( event ); } );
connect( this.iframe.contentWindow, "onblur", function ( event ) { self.blurred( event ); } );
connect( this.iframe.contentWindow, "onfocus", function ( event ) { self.focused( event ); } );
connect( this.document, "onclick", function ( event ) { self.mouse_clicked( event ); } );
connect( this.document, "onmouseover", function ( event ) { self.mouse_hovered( event ); } );

View File

@ -1017,6 +1017,7 @@ Wiki.prototype.editor_focused = function ( editor, synchronous ) {
if ( this.focused_editor && this.focused_editor != editor && this.focused_editor.iframe ) {
this.clear_pulldowns();
removeElementClass( this.focused_editor.iframe, "focused_note_frame" );
this.focused_editor.blurred();
// 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() ) {