diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php index 18b35fcecc9..61b72b2c8f5 100644 --- a/mod/chat/gui_header_js/chatinput.php +++ b/mod/chat/gui_header_js/chatinput.php @@ -1,6 +1,6 @@
- +
diff --git a/mod/chat/gui_header_js/jsupdate.php b/mod/chat/gui_header_js/jsupdate.php index cd3cc71a53e..87fed99ccef 100644 --- a/mod/chat/gui_header_js/jsupdate.php +++ b/mod/chat/gui_header_js/jsupdate.php @@ -1,6 +1,6 @@ - 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); + } } //]]>