From efb1ae6422fbf70054fc5b7571bde95d5275a50f Mon Sep 17 00:00:00 2001 From: Afonso Duarte Date: Tue, 8 Dec 2015 13:53:15 +0000 Subject: [PATCH] Fixes #7449 [Magellan] Last menu element active on load if body has no margin Uses document.documentElement.clientHeight to calculate viewport height instead of document.body.clientHeight. See http://jsfiddle.net/tzdcx/1/ for differences between the two. --- js/foundation.magellan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/foundation.magellan.js b/js/foundation.magellan.js index a9620337c..db05a17a5 100644 --- a/js/foundation.magellan.js +++ b/js/foundation.magellan.js @@ -93,7 +93,7 @@ html = document.documentElement; this.points = []; - this.winHeight = Math.round(Math.max(window.innerHeight, document.body.clientHeight)); + this.winHeight = Math.round(Math.max(window.innerHeight, html.clientHeight)); this.docHeight = Math.round(Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight)); this.$targets.each(function(){ -- 2.47.2