Skip to content

Commit

Permalink
Workaround a JavaScript exception in Opera.
Browse files Browse the repository at this point in the history
  • Loading branch information
madrobby committed Sep 28, 2008
1 parent 289c87d commit deb47c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Workaround a JavaScript exception in Opera. (Thomas Fuchs)

* Improve NodeList detection for Safari's $A function. (Garrett Smith, jddalton)

* Use different tactic to sniff for Opera in order to avoid false positives in IE. (Tobie Langel, jddalton)
Expand Down
2 changes: 1 addition & 1 deletion src/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ Element.Methods = {

element = forElement;
do {
if (!Prototype.Browser.Opera || element.tagName.toUpperCase() == 'BODY') {
if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
valueT -= element.scrollTop || 0;
valueL -= element.scrollLeft || 0;
}
Expand Down

0 comments on commit deb47c6

Please sign in to comment.