I recently discovered a functionality of jQuery Chosen which automatically scrolls the .chosen-results Container downwards when you hover the bottom of the container.
I already found the function (result_do_highlight) which does that: here
This is the part where the automatic scroll happens in the function:
if high_bottom >= visible_bottom
@search_results.scrollTop if (high_bottom - maxHeight) > 0 then (high_bottom - maxHeight) else 0
else if high_top < visible_top
@search_results.scrollTop high_top
Is there a way to prevent scrolling?
Thank you in advance
EDIT
I forked the Chosen-git and added a workaround: github.com/puresamari/chosen
here is how to use it:
I added the funtionallity to disable the automatic scroll towards the highlighted option: Use it like this:
$('your_select').chosen({
scroll_to_highlighted: false
});
the parameter ´scroll_to_highlighted´ is optional and default true
I forked the Chosen-git and added a workaround: github.com/puresamari/chosen
here is how to use it:
I added the funtionallity to disable the automatic scroll towards the highlighted option: Use it like this:
$('your_select').chosen({
scroll_to_highlighted: false
});
the parameter ´scroll_to_highlighted´ is optional and default true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With