diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php index 84e5b06c088..3eec4008bb5 100644 --- a/mod/chat/gui_header_js/chatinput.php +++ b/mod/chat/gui_header_js/chatinput.php @@ -53,7 +53,7 @@ onsubmit="return empty_field_and_submit()" style="margin:0">
- +
diff --git a/mod/chat/gui_header_js/jsupdate.php b/mod/chat/gui_header_js/jsupdate.php index 1e2e01ee109..0277eb5a216 100644 --- a/mod/chat/gui_header_js/jsupdate.php +++ b/mod/chat/gui_header_js/jsupdate.php @@ -141,8 +141,11 @@ } } ?> - if(parent.msg && parent.input.document.getElementById('auto').checked){ - parent.msg.scroll(1,5000000); + if(parent.input){ + var autoscroll = parent.input.document.getElementById('auto'); + if(parent.msg && autoscroll && autoscroll.checked){ + parent.msg.scroll(1,5000000); + } } //]]>