witten
/
luminotes
Archived
1
0
Fork 0

Fix: When a blank editor is open, and new note is clicked, just highlight that blank editor.

This commit is contained in:
Dan Helfman 2009-01-24 23:48:10 -08:00
parent 83e2db29f1
commit fa6c9dbc7b
2 changed files with 8 additions and 4 deletions

View File

@ -51,6 +51,10 @@ function Shared_iframe() {
document.close();
}
Shared_iframe.prototype.editor = function () {
return this.iframe.editor;
}
function Editor( id, notebook_id, note_text, deleted_from_id, revision, read_write, startup, highlight, focus, position_after, start_dirty, own_notes_only ) {
this.id = id;

View File

@ -489,8 +489,8 @@ Wiki.prototype.create_blank_editor = function ( event ) {
}
// if there is already a blank editor, then highlight it and bail
if ( Editor.shared_iframe && Editor.shared_iframe.editor && Editor.shared_iframe.editor.empty() ) {
Editor.shared_iframe.editor.highlight();
if ( Editor.shared_iframe && Editor.shared_iframe.editor() && Editor.shared_iframe.editor().empty() ) {
Editor.shared_iframe.editor().highlight();
return;
}
@ -854,8 +854,8 @@ Wiki.prototype.create_editor = function ( id, note_text, deleted_from_id, revisi
}
Wiki.prototype.resize_editor = function () {
if ( Editor.shared_frame && Editor.shared_iframe.editor )
Editor.shared_iframe.editor.resize();
if ( Editor.shared_iframe && Editor.shared_iframe.editor() )
Editor.shared_iframe.editor().resize();
}
Wiki.prototype.resize_toolbar = function () {