summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2015-02-09 23:04:30 +0000
committerJohn McLear <john@mclear.co.uk>2015-02-09 23:04:30 +0000
commit0ad09c17db0ec113c349857067ab3bdaeb70194d (patch)
tree6d25a1a26779b51bb87d85973fc54d262f6edc42
parent26ae37572701a97bec4883d15a98b99971c6bda2 (diff)
downloadetherpad-lite-0ad09c17db0ec113c349857067ab3bdaeb70194d.zip
fix JS error in timeslider if offset doesn't exist
-rw-r--r--src/static/js/pad_editbar.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js
index 4dc80860..7d0539af 100644
--- a/src/static/js/pad_editbar.js
+++ b/src/static/js/pad_editbar.js
@@ -188,16 +188,22 @@ var padeditbar = (function()
$('#editorcontainer').css("top", containerTop);
// make sure pop ups are in the right place
- $('.popup').css("top", $('#editorcontainer').offset().top + "px");
+ if($('#editorcontainer').offset()){
+ $('.popup').css("top", $('#editorcontainer').offset().top + "px");
+ }
// If sticky chat is enabled..
if($('#options-stickychat').is(":checked")){
- $('#chatbox').css("top", $('#editorcontainer').offset().top + "px");
+ if($('#editorcontainer').offset()){
+ $('#chatbox').css("top", $('#editorcontainer').offset().top + "px");
+ }
};
// If chat and Users is enabled..
if($('#options-chatandusers').is(":checked")){
- $('#users').css("top", $('#editorcontainer').offset().top + "px");
+ if($('#editorcontainer').offset()){
+ $('#users').css("top", $('#editorcontainer').offset().top + "px");
+ }
}
},