From deb47c636195fb59d9cfeaa759c09757b8c2b0e6 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Sun, 28 Sep 2008 21:12:15 +0200 Subject: [PATCH] Workaround a JavaScript exception in Opera. --- CHANGELOG | 2 ++ src/dom.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index dbeca92..79a7ea4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/src/dom.js b/src/dom.js index 89e17ee..87bdbac 100644 --- a/src/dom.js +++ b/src/dom.js @@ -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; }