Merge pull request #2259 from thelounge/xpaw/keybind-scroll
Scroll channel list only when using keybinds
This commit is contained in:
commit
bb4740ba76
@ -3,6 +3,7 @@
|
||||
const $ = require("jquery");
|
||||
const Mousetrap = require("mousetrap");
|
||||
const wrapCursor = require("undate").wrapCursor;
|
||||
const utils = require("./utils");
|
||||
const input = $("#input");
|
||||
const sidebar = $("#sidebar");
|
||||
const windows = $("#windows");
|
||||
@ -54,7 +55,8 @@ Mousetrap.bind([
|
||||
break;
|
||||
}
|
||||
|
||||
channels.eq(target).click();
|
||||
target = channels.eq(target).click();
|
||||
utils.scrollIntoViewNicely(target[0]);
|
||||
|
||||
return false;
|
||||
});
|
||||
@ -88,7 +90,8 @@ Mousetrap.bind([
|
||||
break;
|
||||
}
|
||||
|
||||
lobbies.eq(target).click();
|
||||
target = lobbies.eq(target).click();
|
||||
utils.scrollIntoViewNicely(target[0]);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
@ -378,8 +378,6 @@ $(function() {
|
||||
utils.toggleNotificationMarkers(false);
|
||||
}
|
||||
|
||||
utils.scrollIntoViewNicely(self[0]);
|
||||
|
||||
if ($(window).outerWidth() < utils.mobileViewportPixels) {
|
||||
slideoutMenu.toggle(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user