Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8749 closed bug (duplicate)

non-JS script nodes ejected during DOM manipulation

Reported by: BenBlank Owned by:
Priority: high Milestone: 1.next
Component: manipulation Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

Description

Non-JS <script> nodes (such as the <script type="text/html"> nodes often used with jquery-tmpl) are ejected from nodes which pass through $.fn.domManip. Simple test case on jsFiddle.

The culprit appears to be this block in $.clean. The current behavior is obviously deliberate, but on the surface it isn't clear why. It seems to have originated without comment when domManip was switched to DOM fragments prior to version 1.3.

Can we change this behavior? It's very surprising to have nodes reparented like this (especially as JS scripts aren't affected).

Change History (2)

comment:1 Changed 5 years ago by rwaldron

  • Component changed from unfiled to manipulation
  • Priority changed from undecided to high
  • Resolution set to duplicate
  • Status changed from new to closed

comment:2 Changed 5 years ago by rwaldron

Duplicate of #6180.

Note: See TracTickets for help on using tickets.