diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index af40f234..26b3ccb3 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -1805,15 +1805,20 @@ table.settings th {\ } } - -function cumulativeOffset(element) { +function cumulativeOffset(element) +{ var valueT = 0, valueL = 0; - if (!element) return [0, 0]; - do { + if (!element) + return [0, 0]; + + do + { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; element = element.offsetParent; - } while (element); + } + while (element); + return [valueL, valueT]; } @@ -1843,9 +1848,6 @@ function cumulativeOffset(element) { - - -