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 $ = require("jquery");
|
||||||
const Mousetrap = require("mousetrap");
|
const Mousetrap = require("mousetrap");
|
||||||
const wrapCursor = require("undate").wrapCursor;
|
const wrapCursor = require("undate").wrapCursor;
|
||||||
|
const utils = require("./utils");
|
||||||
const input = $("#input");
|
const input = $("#input");
|
||||||
const sidebar = $("#sidebar");
|
const sidebar = $("#sidebar");
|
||||||
const windows = $("#windows");
|
const windows = $("#windows");
|
||||||
@ -54,7 +55,8 @@ Mousetrap.bind([
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
channels.eq(target).click();
|
target = channels.eq(target).click();
|
||||||
|
utils.scrollIntoViewNicely(target[0]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -88,7 +90,8 @@ Mousetrap.bind([
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
lobbies.eq(target).click();
|
target = lobbies.eq(target).click();
|
||||||
|
utils.scrollIntoViewNicely(target[0]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -378,8 +378,6 @@ $(function() {
|
|||||||
utils.toggleNotificationMarkers(false);
|
utils.toggleNotificationMarkers(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
utils.scrollIntoViewNicely(self[0]);
|
|
||||||
|
|
||||||
if ($(window).outerWidth() < utils.mobileViewportPixels) {
|
if ($(window).outerWidth() < utils.mobileViewportPixels) {
|
||||||
slideoutMenu.toggle(false);
|
slideoutMenu.toggle(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user