Bug Tracker

Opened 7 years ago

Closed 7 years ago

#13616 closed bug (notabug)

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:

Description

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: http://jsfiddle.net/QuVMp/14/

Change History (3)

comment:1 Changed 7 years ago by dmethvin

Owner: set to morphous
Status: newpending

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

comment:2 Changed 7 years ago by morphous

Status: pendingnew

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

Thanks

comment:3 Changed 7 years ago by dmethvin

Resolution: notabug
Status: newclosed
Note: See TracTickets for help on using tickets.