witten
/
luminotes
Archived
1
0
Fork 0

Fixed a rare bug in which Luminotes sometimes indicated that the current note was saved even when it wasn't.

Fortunately, this was just a visual bug, and the current note was always saved correctly.

The reproduction steps were:

 1. Open two notes, A and B.
 2. Modify note A, and then switch to note B. This causes note A to save.
 3. The save happens to take a long time (which you can force with a sleep).
 4. While the save is executing, quickly modifiy note B.
 5. When the original save completes, the "save" button changes to "saved",
    even though note B has been modified and is not saved.

The solution was simply to check whether the focused note is dirty before changing to a "saved" button.
This commit is contained in:
Dan Helfman 2008-11-21 12:56:06 -08:00
parent 3c11526480
commit 54744dd3a9
2 changed files with 5 additions and 2 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
1.5.8:
* Fixed a bug that prevented the autosaver from working on all notebooks.
* Fixed a rare bug in which Luminotes sometimes indicated that the current
note was saved even when it wasn't. Fortunately, this was just a visual
bug, and the current note was always saved correctly.
1.5.7: November 18, 2008
* Rearranged the links on the left and right side of the wiki editing page

View File

@ -1611,7 +1611,7 @@ Wiki.prototype.save_editor = function ( editor, fire_and_forget, callback, synch
editor.mark_clean();
var save_button = getElement( "save_button" );
if ( save_button ) {
if ( save_button && self.focused_editor && !self.focused_editor.dirty() ) {
save_button.disabled = true;
save_button.value = "saved";
}
@ -1632,7 +1632,7 @@ Wiki.prototype.save_editor = function ( editor, fire_and_forget, callback, synch
}, null, synchronous, fire_and_forget );
} else {
var save_button = getElement( "save_button" );
if ( save_button ) {
if ( save_button && this.focused_editor && !this.focused_editor.dirty() ) {
save_button.disabled = true;
save_button.value = "saved";
}