diff --git a/src/js/select2/results.js b/src/js/select2/results.js index 1e49263c..e55cc879 100644 --- a/src/js/select2/results.js +++ b/src/js/select2/results.js @@ -397,11 +397,7 @@ define([ this.$results.on('mousewheel', function (e) { var top = self.$results.scrollTop(); - var bottom = ( - self.$results.get(0).scrollHeight - - self.$results.scrollTop() + - e.deltaY - ); + var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();