Scroll to top of tests when complete
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 15 Jun 2011 14:38:22 -0600
changeset 277 2ec48d7f0147
parent 276 8988db297760
child 278 c655c4c7776c
Scroll to top of tests when complete

Browsers tend to scroll themselves to some random point in the middle or
at the end of the tests that just completed, based on how they handle
scrolling when there are DOM changes.
autoimplementation.html
--- a/autoimplementation.html	Wed Jun 15 14:35:26 2011 -0600
+++ b/autoimplementation.html	Wed Jun 15 14:38:22 2011 -0600
@@ -78,6 +78,8 @@
 	for (var i = 0; i < inputs.length; i++) {
 		inputs[i].value = "";
 	}
+
+	document.querySelector("#" + command).scrollIntoView();
 }
 
 function addTest(command) {