Reduce search field focusing, improving performance
Signed-off-by: Igor Vaynberg <igor.vaynberg@gmail.com>
This commit is contained in:
parent
9497693b64
commit
64b69425b0
@ -422,8 +422,8 @@
|
|||||||
// initialize the container
|
// initialize the container
|
||||||
this.initContainer();
|
this.initContainer();
|
||||||
|
|
||||||
installFilteredMouseMove(this.results);
|
//installFilteredMouseMove(this.results);
|
||||||
this.dropdown.delegate(resultsSelector, "mousemove-filtered", this.bind(this.highlightUnderEvent));
|
this.dropdown.delegate(resultsSelector, "mouseover", this.bind(this.highlightUnderEvent));
|
||||||
|
|
||||||
installDebouncedScroll(80, this.results);
|
installDebouncedScroll(80, this.results);
|
||||||
this.dropdown.delegate(resultsSelector, "scroll-debounced", this.bind(this.loadMoreIfNeeded));
|
this.dropdown.delegate(resultsSelector, "scroll-debounced", this.bind(this.loadMoreIfNeeded));
|
||||||
@ -773,7 +773,7 @@
|
|||||||
$(choices[index]).addClass("select2-highlighted");
|
$(choices[index]).addClass("select2-highlighted");
|
||||||
this.ensureHighlightVisible();
|
this.ensureHighlightVisible();
|
||||||
|
|
||||||
if (this.opened()) this.focusSearch();
|
//if (this.opened()) this.focusSearch();
|
||||||
},
|
},
|
||||||
|
|
||||||
highlightUnderEvent: function (event) {
|
highlightUnderEvent: function (event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user