From b14c9afa58890175cc575c0f263208607a1a2cc7 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Mon, 5 Nov 2007 17:54:13 +0000 Subject: [PATCH] Exclude Opera from using the sourceIndex approach in Element#descendantOf. [Tobie Langel, Andrew Dupont] --- CHANGELOG | 2 ++ src/dom.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index da9a811..d0bea47 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Exclude Opera from using the sourceIndex approach in Element#descendantOf. [Tobie Langel, Andrew Dupont] + * Ensure Element#hasClassName always returns a boolean. Closes #10075. [ronnylovtangen, Tobie Langel] * Ensure selectors of the form "[href]" (attribute token with no preceding tag name) work properly. Closes #8870. [chao, kangax, Andrew Dupont] diff --git a/src/dom.js b/src/dom.js index f2367f4..b480015 100644 --- a/src/dom.js +++ b/src/dom.js @@ -362,7 +362,7 @@ Element.Methods = { if (element.compareDocumentPosition) return (element.compareDocumentPosition(ancestor) & 8) === 8; - if (element.sourceIndex) { + if (element.sourceIndex && !Prototype.Browser.Opera) { var e = element.sourceIndex, a = ancestor.sourceIndex, nextAncestor = ancestor.nextSibling; if (!nextAncestor) {