From b96077039fd4785e5264cdf004ae5e24d03dc26f Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 15 Jul 2015 00:32:48 -0400 Subject: [PATCH] Fix low-res userlist The userlist in low-res mode now scrolls to top before collapsing, which fixes the issue where it might not display the user-count and toggle button. --- js/client-chat.js | 4 +++- style/client.css | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/client-chat.js b/js/client-chat.js index 0ac66c1b7..b0d5cd91f 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -1479,7 +1479,8 @@ '!': 9, '‽': 10 }, - toggleUserlist: function() { + toggleUserlist: function(e) { + e.stopPropagation(); if (this.$el.hasClass('userlist-minimized')) { this.$el.removeClass('userlist-minimized'); this.$el.addClass('userlist-maximized'); @@ -1493,6 +1494,7 @@ this.$el.removeClass('userlist-maximized'); }, hide: function() { + this.$el.scrollTop(0); this.$el.addClass('userlist-minimized'); }, updateUserCount: function () { diff --git a/style/client.css b/style/client.css index 813e59c1f..fd3b28d92 100644 --- a/style/client.css +++ b/style/client.css @@ -1314,9 +1314,9 @@ div[class^='tournament-message-'], div[class*=' tournament-message-'] { } .userlist-maximized { height: auto; - bottom: auto; + bottom: 0; + overflow: auto; background: #EEF2F5; - border-bottom: 1px solid #AAAAAA; } .userlist-minimized .userlist-count, .userlist-maximized .userlist-count {