Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

viewportOffset: extend forElement (it's used twice) #87

Merged
merged 1 commit into from

3 participants

@victor-homyakov

forElement was used twice in viewportOffset:
1. at line 1147 as var element = $(forElement);
2. at line 1156 as element = forElement;
This leads to error when forElement is string: Element.viewportOffset('id')

@victor-homyakov victor-homyakov viewportOffset: extend forElement (it's used twice)
`forElement` was used twice in `viewportOffset`:
1. at line 1147 as `var element = $(forElement);`
2. at line 1156 as `element = forElement;`
This leads to error when `forElement` is string: `Element.viewportOffset('id')`
a8f0434
@savetheclocktower savetheclocktower merged commit fe2b76f into from
@victor-homyakov victor-homyakov deleted the branch
@fideloper

This fixed issues for us which cropped up in the latest release of Chrome (v 32.0.17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 25, 2012
  1. @victor-homyakov

    viewportOffset: extend forElement (it's used twice)

    victor-homyakov authored
    `forElement` was used twice in `viewportOffset`:
    1. at line 1147 as `var element = $(forElement);`
    2. at line 1156 as `element = forElement;`
    This leads to error when `forElement` is string: `Element.viewportOffset('id')`
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/prototype/dom/layout.js
View
3  src/prototype/dom/layout.js
@@ -1144,7 +1144,8 @@
function viewportOffset(forElement) {
var valueT = 0, valueL = 0, docBody = document.body;
- var element = $(forElement);
+ forElement = $(forElement);
+ var element = forElement;
do {
valueT += element.offsetTop || 0;
valueL += element.offsetLeft || 0;
Something went wrong with that request. Please try again.