Side navigation
#13058 closed bug (duplicate)
Opened December 14, 2012 08:59PM UTC
Closed October 08, 2013 01:12PM UTC
.text() doubles text for last xml item on (mobile) Safari
Reported by: | mail2008@medialabs.at | Owned by: | mail2008@medialabs.at |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Dear jQuery-Team,
I think I found a bug:
- I load XML data to jQuery, part of it contains CDATA.
- I output a CDATA node.
- When iterating through the elements, everything is fine, except for the last element in the XML list: Here, all CDATA text (only this!) is doubled.
See: http://jsfiddle.net/pHAUb/3/
This happens only in Mobile Safari (iPhone 4, iOS 6). I don't have an iPad or a Mac to test if it happens on other Apple products as well. It does NOT happen in Firefox, Chrome or IE9.
Best regards,
Markus
Attachments (0)
Change History (8)
Changed December 14, 2012 09:05PM UTC by comment:1
Changed December 21, 2012 04:17AM UTC by comment:2
owner: | → mail2008@medialabs.at |
---|---|
status: | new → pending |
This sounds like it may be a Mobile Safari bug if it only happens on one browser. Can you create a test case that shows it working properly without jQuery?
Changed December 21, 2012 10:12AM UTC by comment:3
status: | pending → new |
---|
Sorry, I wouldn't know how to do this. All I can say is that even WITH jQuery it can work properly if I use another selector: .eq(index) instead of .find('item[id="xxx"]'). It only fails using the .find('item[id="xxx"]') selector.
Changed January 26, 2013 09:00PM UTC by comment:4
Can anyone else repro this? I don't have iOS6.
Changed February 24, 2013 09:39PM UTC by comment:5
resolution: | → patchwelcome |
---|---|
status: | new → closed |
Anyone who can repro is welcome to provide additional information and a patch.
Changed June 11, 2013 04:24PM UTC by comment:6
We have the same or a similar problem on our mobile site when using .text on an element. We are replacing a phone number when the page loads.
Works fine on desktop but mobile safari is doubling the phone number in the header and footer. It's also a problem on our area page http://www.meyerre.com/area/
Changed October 08, 2013 01:11PM UTC by comment:7
resolution: | patchwelcome |
---|---|
status: | closed → reopened |
As it turns out, this stemmed from numeric values of the "id" attribute.
I forgot one thing: It must have something to do with the selector 'item[id="xxx"]'. When I access the CDATA node using the .eq(index) selector, the error does not appear.