diff options
author | Lu Wang <coolwanglu@gmail.com> | 2013-11-26 04:08:18 +0800 |
---|---|---|
committer | Lu Wang <coolwanglu@gmail.com> | 2013-11-26 04:08:18 +0800 |
commit | 7da74b04f9733a801fbd1ff90acc55309121e1b6 (patch) | |
tree | d578230082eae2b9dbe1d930e9c7f7c76163a756 /src | |
parent | 7bfe50dd453ef53fdb501685d360e56895ebb60f (diff) |
correct way of scrollinbg to bottom
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.html b/src/shell.html index 53a4fffb..efb9e91d 100644 --- a/src/shell.html +++ b/src/shell.html @@ -50,7 +50,7 @@ //text = text.replace(/>/g, ">"); //text = text.replace('\n', '<br>', 'g'); element.value += text + "\n"; - element.scrollTop = 99999; // focus on bottom + element.scrollTop = element.scrollHeight; // focus on bottom }; })(), printErr: function(text) { |