diff --git a/src/static/js/chat.js b/src/static/js/chat.js index ed01600fb..74df5fc27 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -54,11 +54,18 @@ var chat = (function() }, hide: function () { - $("#chatcounter").text("0"); - $("#chaticon").show(); - $("#chatbox").hide(); - $.gritter.removeAll(); - $("#gritter-notice-wrapper").show(); + // decide on hide logic based on chat window being maximized or not + if ($('#options-stickychat').prop('checked')) { + chat.stickToScreen(); + $('#options-stickychat').prop('checked', false); + } + else { + $("#chatcounter").text("0"); + $("#chaticon").show(); + $("#chatbox").hide(); + $.gritter.removeAll(); + $("#gritter-notice-wrapper").show(); + } }, scrollDown: function() { diff --git a/src/templates/pad.html b/src/templates/pad.html index eaa949dec..f6adfe9ce 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -390,7 +390,7 @@
- + █  
@@ -476,18 +476,6 @@ padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar; padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp; }()); - - function minimizeChatbox() - { - if ($('#options-stickychat').prop('checked')) { - chat.stickToScreen(); - $('#options-stickychat').prop('checked', false); - } else { - chat.hide(); - } - - return false; - } <% e.end_block(); %>