From eb64bcfe3303e3b2e8832eaa7432b32cd0b5881f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=A4=AA?= Date: Sun, 22 Dec 2013 09:05:09 +1100 Subject: [PATCH] Fix tournament box not disappearing if it was hidden when the tournament ends --- js/client-chat-tournament.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/client-chat-tournament.js b/js/client-chat-tournament.js index 1e66a9b92..ce25e2a38 100644 --- a/js/client-chat-tournament.js +++ b/js/client-chat-tournament.js @@ -137,7 +137,7 @@ if (self.$box.hasClass('active')) self.$box.css('transition', 'none'); if (!self.info.isActive) - self.$wrapper.removeClass('active'); + self.$wrapper.find('.active').andSelf().removeClass('active'); }); this.$join.on('click', function() { @@ -333,8 +333,10 @@ this.info = {}; this.savedBracketPosition = {}; - this.$box.removeClass('active'); - this.$box.css('transition', ''); + if (!this.$box.hasClass('active')) + this.$wrapper.find('.active').andSelf().removeClass('active'); + else + this.setBoxVisibility(false); if (cmd === 'forceend') this.room.$chat.append("
The tournament was forcibly ended.
");