Bug Tracker

Opened 11 years ago

Closed 10 years ago

#3344 closed bug (duplicate)

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 (371 bytes) - added by waterson 11 years ago.
Proposed changes

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by waterson

Attachment: 3344.patch added

Proposed changes

comment:1 Changed 10 years ago by Mormegil

Probably a duplicate of ticket #2977.

comment:2 Changed 10 years ago by waterson

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

comment:3 Changed 10 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Dup of #2977 (fixed).

Note: See TracTickets for help on using tickets.