witten
/
luminotes
Archived
1
0
Fork 0

* bug: occasionally, undeleted notes don't leave the trash (but change to having non-trash buttons when undeleted).

repro:
    1. delete a note
    2. go to the trash
    3. click undelete, and then *very quickly*, click the name of the notebook
    4. when the notebook loads, it won't have the undeleted note
    5. go back to the trash. the deleted note will be there, with non-trash note buttons
  this seems to be a race between undelete_editor_via_trash() and save_editor(), which is invoked upon page close. solution: don't
  allow save_editor() to call save_note() if editor.closed is set
This commit is contained in:
Dan Helfman 2008-01-18 21:29:11 +00:00
parent 6d9d64497e
commit e4c6fa052a
1 changed files with 1 additions and 1 deletions

View File

@ -1132,7 +1132,7 @@ Wiki.prototype.save_editor = function ( editor, fire_and_forget ) {
editor = this.focused_editor;
var self = this;
if ( editor && editor.read_write && !( editor.id == this.blank_editor_id && editor.empty() ) ) {
if ( editor && editor.read_write && !( editor.id == this.blank_editor_id && editor.empty() ) && !editor.closed ) {
this.invoker.invoke( "/notebooks/save_note", "POST", {
"notebook_id": this.notebook_id,
"note_id": editor.id,