diff --git a/src/static/js/chat.js b/src/static/js/chat.js index e84a8ca6b..9dee3be4f 100755 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -47,6 +47,9 @@ exports.chat = (() => { }, // Make chat stick to right hand side of screen stickToScreen(fromInitialCall) { + if ($('#options-stickychat').prop('checked')) { + $('#options-stickychat').prop('checked', false); + } if (pad.settings.hideChat) { return; } diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 18c33c5c5..908f3a037 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -412,6 +412,7 @@ const pad = { setTimeout(() => { padeditor.ace.focus(); }, 0); + $('#options-stickychat').on('click', () => { chat.stickToScreen(); }); // if we have a cookie for always showing chat then show it if (padcookie.getPref('chatAlwaysVisible')) { chat.stickToScreen(true); // stick it to the screen diff --git a/src/templates/pad.html b/src/templates/pad.html index bc3cec88e..54e1897d9 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -122,7 +122,7 @@ <% e.begin_block("mySettings"); %>