From 252be1988537e4915f6bed5bfed407abd2bfa91a Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 25 Nov 2013 17:33:33 +0000 Subject: [PATCH] make sticky chat mroe responsive to changes in top bar --- src/static/js/chat.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/static/js/chat.js b/src/static/js/chat.js index ed9b258f..035dc273 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -43,9 +43,12 @@ var chat = (function() $('#chatbox').addClass("stickyChat"); $('#chattext').css({"top":"0px"}); $('#editorcontainer').css({"right":"192px"}); + var editorcontainerTop = $('#editorcontainer').offset().top; + $('.stickyChat').css("top",editorcontainerTop+"px"); isStuck = true; } else { // Unstick it padcookie.setPref("chatAlwaysVisible", false); + $('.stickyChat').css("top", "auto"); $('#chatbox').removeClass("stickyChat"); $('#chattext').css({"top":"25px"}); $('#editorcontainer').css({"right":"0px"});