Workaround a JavaScript exception in Opera.

This commit is contained in:
Thomas Fuchs 2008-09-28 21:12:15 +02:00
parent 289c87d4b1
commit deb47c6361
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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;
}