Skip to content

Commit c544ef6

Browse files
committed
Keyboard scrolling improved
1 parent 361dfa5 commit c544ef6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

jquery.custom-scrollbar.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,12 @@
152152
initKeyboardScrolling: function () {
153153
var _this = this;
154154

155-
// keydown handler
156155
this.elementKeydown = function (event) {
157-
if (!$(document.activeElement).is('select, input, textarea')) {
156+
if (document.activeElement === _this.$element[0]) {
158157
if (_this.vScrollbar)
159158
_this.vScrollbar.keyScroll(event);
160159
if (_this.hScrollbar)
161160
_this.hScrollbar.keyScroll(event);
162-
return false;
163161
}
164162
}
165163

0 commit comments

Comments
 (0)