Scroll channel list only when using keybinds

This commit is contained in:
Pavel Djundik 2018-03-20 19:44:27 +02:00 committed by Jérémie Astori
parent d7d8a51332
commit 528d2b5fb7
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8
2 changed files with 5 additions and 4 deletions

View file

@ -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;
});

View file

@ -378,8 +378,6 @@ $(function() {
utils.toggleNotificationMarkers(false);
}
utils.scrollIntoViewNicely(self[0]);
if ($(window).outerWidth() < utils.mobileViewportPixels) {
slideoutMenu.toggle(false);
}