Skip to main content

Bug Tracker

Side navigation

#3344 closed bug (duplicate)

Opened September 09, 2008 02:55PM UTC

Closed December 10, 2009 03:19AM UTC

wrapAll should probably call clone(true)

Reported by: waterson Owned by:
Priority: minor Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

Right now, wrap calls "clone()" instead of "clone(true)". This has the effect of causing any event handlers on the wrapping node to be lost; for example,

$("#someElement").wrap($("<div>").click(function() { alert("hi"); }));

ends up being equivalent to:

$("#someElement").wrap($("<div>"));

This is not hard to work around, but it would be nice to fix!

Attachments (1)
  • 3344.patch (0.4 KB) - added by waterson September 09, 2008 03:42PM UTC.

    Proposed changes

Change History (3)

Changed August 15, 2009 04:38PM UTC by Mormegil comment:1

Probably a duplicate of ticket #2977.

Changed September 15, 2009 04:13PM UTC by waterson comment:2

Yeah, definitely a dup...we can close this bug.

Changed December 10, 2009 03:19AM UTC by dmethvin comment:3

resolution: → duplicate
status: newclosed

Dup of #2977 (fixed).