Bug Tracker

Ticket #11493 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

Script tag and clone method

Reported by: tomolson82@… Owned by: rwaldron
Priority: high Milestone: None
Component: manipulation Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

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/

Change History

comment:1 Changed 2 years ago by rwaldron

  • Owner set to rwaldron
  • Priority changed from undecided to high
  • Status changed from new to assigned
  • Component changed from unfiled to manipulation

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

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

comment:2 Changed 2 years ago by gibson042

@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/

comment:3 Changed 2 years ago by rwaldron

  • Status changed from assigned to closed
  • Resolution set to invalid

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

comment:4 Changed 2 years ago by tomolson82@…

@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.

comment:5 Changed 2 years ago by gibson042

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

comment:6 Changed 2 years ago by rwaldron

  • Status changed from closed to reopened
  • Resolution invalid deleted

H

comment:7 Changed 2 years ago by rwaldron

  • Status changed from reopened to closed
  • Resolution set to duplicate

comment:8 Changed 2 years ago by rwaldron

Duplicate of #11359.

Note: See TracTickets for help on using tickets.