mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Use scroll into view instead
This commit is contained in:
parent
17ded0a3bd
commit
a2b2cce815
@ -663,9 +663,7 @@
|
|||||||
if (selected_channel != channel_id && guild_channels[channel_id] && guild_channels[channel_id].read) {
|
if (selected_channel != channel_id && guild_channels[channel_id] && guild_channels[channel_id].read) {
|
||||||
if (animate_it) {
|
if (animate_it) {
|
||||||
$("#guild-btn").sideNav("show");
|
$("#guild-btn").sideNav("show");
|
||||||
if (!element_in_view($("#channel-"+channel_id), true)) {
|
$("#channel-"+channel_id)[0].scrollIntoView({behavior: "smooth"});
|
||||||
$("#guild-nav").animate({ scrollTop: $(document).height() }, "fast");
|
|
||||||
}
|
|
||||||
flashElement($("#channel-"+channel_id));
|
flashElement($("#channel-"+channel_id));
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$("#guild-btn").sideNav("hide");
|
$("#guild-btn").sideNav("hide");
|
||||||
|
Loading…
Reference in New Issue
Block a user