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:
parent
3c11526480
commit
54744dd3a9
3
NEWS
3
NEWS
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Reference in New Issue