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 | |
parent | 7bfe50dd453ef53fdb501685d360e56895ebb60f (diff) |
correct way of scrollinbg to bottom
-rw-r--r-- | src/shell.html | 2 | ||||
-rw-r--r-- | tests/embind/shell.html | 2 | ||||
-rw-r--r-- | tests/sdl_canvas_size.html | 2 | ||||
-rw-r--r-- | tests/test_browser.py | 6 |
4 files changed, 6 insertions, 6 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) { diff --git a/tests/embind/shell.html b/tests/embind/shell.html index f0ee10f8..7a3b0a07 100644 --- a/tests/embind/shell.html +++ b/tests/embind/shell.html @@ -48,7 +48,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) { diff --git a/tests/sdl_canvas_size.html b/tests/sdl_canvas_size.html index 50495049..37e3818f 100644 --- a/tests/sdl_canvas_size.html +++ b/tests/sdl_canvas_size.html @@ -51,7 +51,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) { diff --git a/tests/test_browser.py b/tests/test_browser.py index 128820b3..b2cd62f8 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -183,7 +183,7 @@ If manually bisecting: //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) { @@ -274,7 +274,7 @@ If manually bisecting: //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) { @@ -898,7 +898,7 @@ keydown(100);keyup(100); // trigger the end return function(text) { text = Array.prototype.slice.call(arguments).join(' '); element.value += text + "\\n"; - element.scrollTop = 99999; // focus on bottom + element.scrollTop = element.scrollHeight; // focus on bottom }; })() }; |