I am trying to combine select2(4.0.2) and mCustomScrollbar(3.1.13) libraries to have custom dropdown list with custom scrollbar.
Here is the code sample .
$(document).on("select2:open", "select", function() {
$('.select2-results').mCustomScrollbar({
mouseWheel: true,
advanced: {
updateOnContentResize: true
}
});
});
The main issue is mousewheel scrolling. It works only if you hold the cursor over the scrollbar itself. mousewheel.js(3.1.3) included, but it seems not working properly. There is no event firing while scrolling over the dropdown list body.
Any ideas, how to fix it? Thanks in advance.