Skip to main content

Bug Tracker

Side navigation

#13616 closed bug (notabug)

Opened March 15, 2013 02:36PM UTC

Closed March 15, 2013 03:29PM UTC

find ... replaceWith.. not working correctly in Firefox and IE9

Reported by: morphous Owned by: morphous
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

I am trying to convert font tags and their attributes (if any) to span tags using find and replaceWith as follows:

$(targetEl).find('font').replaceWith(function () {
//do stuff here

This works works as expected in the following browsers:

OSX 10.8.2 - Chrome 25.0.1364, Opera 12.14, Safari 6.0.2

Windows 7 64bit - Chrome 24.0.1312, Opera 12.0.2, Safari 5.17

This fails to produce the expected results in the following:

OSX 10.8.2 -Firefox 18.0.2

Win 7 64Bit -Firefox 15.0.1, IE9.0

Expected results are that the font tags are replaced with span tags and the font attributes are parsed and added to the associated span tag. It is apparently failing in that the attributes are not being added to the span tags.

Here is an example case which fails consistently as described:

Attachments (0)
Change History (3)

Changed March 15, 2013 02:40PM UTC by dmethvin comment:1

owner: → morphous
status: newpending

Why are you looking for properties on the object instead of attributes?

Changed March 15, 2013 03:25PM UTC by morphous comment:2

status: pendingnew

Inherited project code - I have moved to look for attributes and all works consistently across the platform and browsers mentioned.


Changed March 15, 2013 03:29PM UTC by dmethvin comment:3

resolution: → notabug
status: newclosed