Side navigation
#14142 closed bug (fixed)
Opened July 17, 2013 09:44AM UTC
Closed July 19, 2013 01:55PM UTC
Last modified October 08, 2013 01:12PM UTC
Wrong number of elements returned in XML document with numeric IDs in Safari
Reported by: | vibes@nothing.ch | Owned by: | gibson042 |
---|---|---|---|
Priority: | low | Milestone: | 1.11/2.1 |
Component: | selector | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In a very special case ''find'' returns the wrong number of elements when used on an XML document with elements that have numeric ids. The exact conditions for this bug to occur are:
- Safari only
- The selector used is of the form "''parent children''"
- One of the children has an id attribute with the value corresponding to the number of children
For a detailed example see: http://jsfiddle.net/fHs96/10/
The same bug probably also occurs on HTML documents (HTML5 allows numeric ids).
Attachments (0)
Change History (8)
Changed July 17, 2013 03:25PM UTC by comment:1
owner: | → gibson042 |
---|---|
status: | new → assigned |
Changed July 17, 2013 05:34PM UTC by comment:2
Changed July 18, 2013 08:56AM UTC by comment:3
Nice, thanks for the quick fix!
Changed July 19, 2013 01:55PM UTC by comment:4
resolution: | → fixed |
---|---|
status: | assigned → closed |
Update Sizzle to 1.10.5. Fixes #14142.
Changeset: 0600a29256be76bd87adb547545bf7219fafb6ee
Changed September 20, 2013 12:10AM UTC by comment:6
milestone: | None → 1.11/2.1 |
---|
Changed September 20, 2013 12:20AM UTC by comment:7
component: | unfiled → selector |
---|---|
priority: | undecided → low |
You've certainly hit an interesting corner case... we use an unusual iteration pattern because
<NodeList>.length
is unreliable on Internet Explorer (allowing elements with id "length" to mask the numeric property), but this shows that<NodeList>[<index>]
is similarly unreliable on Safari.