Skip to main content

Bug Tracker

Side navigation

#11493 closed bug (duplicate)

Opened March 20, 2012 05:37PM UTC

Closed March 20, 2012 07:38PM UTC

Last modified March 20, 2012 07:38PM UTC

Script tag and clone method

Reported by: tomolson82@gmail.com Owned by: rwaldron
Priority: high Milestone: None
Component: manipulation Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Looks like this is fixed in 1.7.2rc1 but thought I'd submit the ticket anyways.

When referencing a script tag by id, and calling clone().html() on it, IE 7 returns null. Other browsers (Chrome, Fiefox) seem to handle this method fine. jsfiddle processing presents the same issue IE7 has.

http://jsfiddle.net/77dt2/

Attachments (0)
Change History (8)

Changed March 20, 2012 05:49PM UTC by rwaldron comment:1

component: unfiledmanipulation
owner: → rwaldron
priority: undecidedhigh
status: newassigned

I just tested in the latest git build and it's not fixed.

http://jsfiddle.net/rwaldron/77dt2/1/

Changed March 20, 2012 07:15PM UTC by gibson042 comment:2

@rwaldron, I think what you're seeing is a side effect of document.write screwing up the DOM, because I observe $("#stag") coming up empty after the first output and the problem evaporating entirely with a safer output strategy.

http://jsfiddle.net/77dt2/2/

Changed March 20, 2012 07:26PM UTC by rwaldron comment:3

resolution: → invalid
status: assignedclosed

@gibson042 well, I originally planned on looking at it this evening... and you're right, it is the document.write calls.

Changed March 20, 2012 07:28PM UTC by tomolson82@gmail.com comment:4

@gibson042, this is correct. Sorry about the weird outputting.

Please see http://jsfiddle.net/77dt2/3/ to note that this was still a bug in IE7 (and 8), but is now correct as http://jsfiddle.net/77dt2/2 shows.

Changed March 20, 2012 07:33PM UTC by gibson042 comment:5

Yes. I believe this ticket is a duplicate of #11359.

Changed March 20, 2012 07:38PM UTC by rwaldron comment:6

resolution: invalid
status: closedreopened

H

Changed March 20, 2012 07:38PM UTC by rwaldron comment:7

resolution: → duplicate
status: reopenedclosed

Changed March 20, 2012 07:38PM UTC by rwaldron comment:8

Duplicate of #11359.