Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-13 16:53:31 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-13 16:53:31 +0400
commit5e405cc1aabdc4f0b4984f380f9f628383595f92 (patch)
tree35d42949bc3381a43d3ffd16e4ce18cbf2f48131 /js
parent5692b6e9bb23a63899ea664a5a4f5840a622ac5c (diff)
refs #4996 content JS tests do now run on IE10, latest FF + Chrome + Safari + Opera and on my local phantomjs but not on travis phantomjs
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 6dfd7430d5..bae7cd3d21 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -1092,7 +1092,7 @@ if (typeof Piwik !== 'object') {
h = el.offsetHeight;
}
- if ((0 === h || 0 === w) && 'hidden' === _getStyle(el, 'overflow')) {
+ if (node === el && (0 === h || 0 === w) && 'hidden' === _getStyle(el, 'overflow')) {
return false;
}
@@ -1738,11 +1738,23 @@ if (typeof Piwik !== 'object') {
wasVisible = (node.offsetTop + rect.height) > 0;
}
+ var docWidth = html.clientWidth; // The clientWidth attribute returns the viewport width excluding the size of a rendered scroll bar
+
+ if (windowAlias.innerWidth && docWidth > windowAlias.innerWidth) {
+ docWidth = windowAlias.innerWidth; // The innerWidth attribute must return the viewport width including the size of a rendered scroll bar
+ }
+
+ var docHeight = html.clientHeight; // The clientWidth attribute returns the viewport width excluding the size of a rendered scroll bar
+
+ if (windowAlias.innerHeight && docHeight > windowAlias.innerHeight) {
+ docWidth = windowAlias.innerHeight; // The innerWidth attribute must return the viewport width including the size of a rendered scroll bar
+ }
+
return (
(rect.bottom > 0 || wasVisible) &&
rect.right > 0 &&
- rect.left < (windowAlias.innerWidth || html.clientWidth) &&
- ((rect.top < (windowAlias.innerHeight || html.clientHeight)) || wasVisible) // rect.top < 0 we assume user has seen all the ones that are above the current viewport
+ rect.left < docWidth &&
+ ((rect.top < docHeight) || wasVisible) // rect.top < 0 we assume user has seen all the ones that are above the current viewport
);
},
isNodeVisible: function (node)