Selector.handlers.id() can remove the browser sniff for IE and Opera
Reported by John-David Dalton | July 1st, 2008 @ 05:12 AM | in 1.6.0.3
The browser sniff for IE and Opera is kind of silly (it appears the only browser that doesn't exhibit this behavior is Safari (at least 3.1 on windows).
The behavior is document.getElementById('foo') not finding element with the ID "foo" if it's not attached to the document.
So I removed the sniff in favor of this.
var needsToSearch = root === document || root.sourceIndex < 1 ||
!Element.descendantOf(root, document.documentElement);
Comments and changes to this ticket
-
John-David Dalton July 1st, 2008 @ 01:44 PM
- → State changed from new to enhancement
-
-
GitHub Robot July 16th, 2008 @ 06:10 PM
- → State changed from enhancement to resolved
(from [4b2913c79f9d57e96360294d7a134593a8819c91]) Ensure Selector.handlers.id finds the proper element even when it's not attached to the document. [#198 state:resolved]
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
