1
0
mirror of synced 2024-11-23 05:26:10 +03:00

do not propagate change event from the search field out of the component. fixes #1178

This commit is contained in:
Igor Vaynberg 2013-04-11 20:22:30 -07:00
parent 733f19e549
commit 06c82f2d0b

View File

@ -661,6 +661,10 @@ the specific language governing permissions and limitations under the Apache Lic
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));
// do not propagate change event from the search field out of the component
$(this.container).delegate(".select2-input", "change", function(e) {e.stopPropagation();});
$(this.dropdown).delegate(".select2-input", "change", function(e) {e.stopPropagation();});
// if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel // if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel
if ($.fn.mousewheel) { if ($.fn.mousewheel) {
results.mousewheel(function (e, delta, deltaX, deltaY) { results.mousewheel(function (e, delta, deltaX, deltaY) {