From 062b6df0eeabe23c6e5d26bcbe8a30e9f2519911 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Wed, 25 Jun 2008 02:16:59 +0000 Subject: [PATCH] "MDL-8642, see tracker, merged from MOODLE_18_STABLE" --- mod/chat/gui_header_js/chatinput.php | 2 +- mod/chat/gui_header_js/jsupdate.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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); + } } //]]>