[Pkg-javascript-commits] [d3-tip.js] 196/277: safari still needs document.body

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.

commit 41e140a77247e8dc280f336af3ea367bdad5719e
Author: Justin Palmer <justin at github.com>
Date:   Tue Oct 29 13:26:56 2013 -0700

    safari still needs document.body
---
 index.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 4608bee..5a0f7c4 100644
--- a/index.js
+++ b/index.js
@@ -246,8 +246,9 @@ d3.tip = function() {
         height     = tbbox.height,
         x          = tbbox.x,
         y          = tbbox.y,
-        scrollTop  = document.documentElement.scrollTop,
-        scrollLeft = document.documentElement.scrollLeft
+        scrollTop  = document.documentElement.scrollTop || document.body.scrollTop,
+        scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft
+
 
     point.x = x + scrollLeft
     point.y = y + scrollTop

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git



More information about the Pkg-javascript-commits mailing list