Possibly fixed a bug in which the displayed suggestions sometimes did not
reflect the most recent characters typed.
This commit is contained in:
parent
6ac620beb0
commit
7f1a644a61
4
NEWS
4
NEWS
|
@ -1,4 +1,4 @@
|
||||||
1.4.12: July ??, 2008:
|
1.4.12: July 7, 2008:
|
||||||
* Fixed a bug in which tab/shift-tab for indending/outdenting nested lists
|
* Fixed a bug in which tab/shift-tab for indending/outdenting nested lists
|
||||||
no longer worked. Also made it work in IE as well (which it never has).
|
no longer worked. Also made it work in IE as well (which it never has).
|
||||||
* controller.Root.guide() now accepts an optional note_id parameter.
|
* controller.Root.guide() now accepts an optional note_id parameter.
|
||||||
|
@ -7,6 +7,8 @@
|
||||||
to a race condition between the link info pulldown's onblur/onchange
|
to a race condition between the link info pulldown's onblur/onchange
|
||||||
handler and the suggestion onclick handler, both of which tried to update
|
handler and the suggestion onclick handler, both of which tried to update
|
||||||
the link, title, and summary at about the same time.
|
the link, title, and summary at about the same time.
|
||||||
|
* Possibly fixed a bug in which the displayed suggestions sometimes did not
|
||||||
|
reflect the most recent characters typed.
|
||||||
|
|
||||||
1.4.11: June 29, 2008:
|
1.4.11: June 29, 2008:
|
||||||
* Fixed bug in which bolding of suggest-as-you-type search text was case
|
* Fixed bug in which bolding of suggest-as-you-type search text was case
|
||||||
|
|
|
@ -3450,6 +3450,7 @@ function Suggest_pulldown( wiki, notebook_id, invoker, anchor, relative_to, sear
|
||||||
anchor.pulldown = this;
|
anchor.pulldown = this;
|
||||||
this.anchor = anchor;
|
this.anchor = anchor;
|
||||||
this.previous_search_text = "";
|
this.previous_search_text = "";
|
||||||
|
this.sequence_number = 0;
|
||||||
|
|
||||||
Pulldown.call( this, wiki, notebook_id, "suggest_pulldown", anchor, relative_to );
|
Pulldown.call( this, wiki, notebook_id, "suggest_pulldown", anchor, relative_to );
|
||||||
|
|
||||||
|
@ -3479,12 +3480,21 @@ Suggest_pulldown.prototype.update_suggestions = function ( search_text ) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this.previous_search_text = search_text;
|
this.previous_search_text = search_text;
|
||||||
|
this.sequence_number += 1;
|
||||||
|
var sequence_number = this.sequence_number;
|
||||||
|
|
||||||
this.invoker.invoke( "/notebooks/search_titles", "GET", {
|
this.invoker.invoke( "/notebooks/search_titles", "GET", {
|
||||||
"notebook_id": this.notebook_id,
|
"notebook_id": this.notebook_id,
|
||||||
"search_text": search_text
|
"search_text": search_text
|
||||||
},
|
},
|
||||||
function( result ) { self.display_suggestions( result, search_text ); }
|
function( result ) {
|
||||||
|
// if the sequence number is not what we expect, then this must not be most recent suggests
|
||||||
|
// update, so bail without displaying the result
|
||||||
|
if ( self.sequence_number != sequence_number )
|
||||||
|
return;
|
||||||
|
|
||||||
|
self.display_suggestions( result, search_text );
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue