[Pkg-mozext-commits] [itsalltext] 241/459: Account for scroll bars

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:25 UTC 2015


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

taffit pushed a commit to branch master
in repository itsalltext.

commit 472d5baa8352c35b497dde8711aeac82dadda7b6
Author: Christian Höltje <docwhat at gerf.org>
Date:   Tue Jun 19 20:07:57 2007 -0400

    Account for scroll bars
---
 src/chrome/content/itsalltext.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/chrome/content/itsalltext.js b/src/chrome/content/itsalltext.js
index 78dcbf7..8fe9c15 100644
--- a/src/chrome/content/itsalltext.js
+++ b/src/chrome/content/itsalltext.js
@@ -547,12 +547,15 @@ var ItsAllText = function() {
         var pnode = node.offsetParent;
         while(pnode && (container === null || pnode != container)) {
             pos[0] += pnode.offsetLeft || 0;
-            pos[1] += pnode.offsetTop || 0;
+            pos[1] += pnode.offsetTop  || 0;
+            pos[0] -= pnode.scrollLeft || 0;
+            pos[1] -= pnode.scrollTop  || 0;
             pnode = pnode.offsetParent;
         }
         return pos;
     };
 
+
     /**
      * This function is called regularly to watch changes to web documents.
      */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git



More information about the Pkg-mozext-commits mailing list