Plugins/WebKit Message View/Template.html
branchfix-autoscroll
changeset 5995 2bfcb17b7076
parent 4647 c8f4e9819f53
--- a/Plugins/WebKit Message View/Template.html	Wed Oct 16 20:22:26 2019 +0100
+++ b/Plugins/WebKit Message View/Template.html	Sat Oct 19 17:34:22 2019 -0700
@@ -214,10 +214,10 @@
 
 		//Auto-scroll to bottom.  Use nearBottom to determine if a scrollToBottom is desired.
 		function nearBottom() {
-			return ( document.body.scrollTop >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) );
+			return ( window.scrollY >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) );
 		}
 		function scrollToBottom() {
-			document.body.scrollTop = document.body.offsetHeight;
+			window.scrollTo(0, document.body.scrollHeight);
 		}
 
 		//Dynamically exchange the active stylesheet