Bug Tracker

Modify

Ticket #3344 (closed bug: duplicate)

Opened 5 years ago

Last modified 3 years ago

wrapAll should probably call clone(true)

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

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

3344.patch Download (371 bytes) - added by waterson 5 years ago.
Proposed changes

Change History

Changed 5 years ago by waterson

Proposed changes

comment:1 Changed 4 years ago by Mormegil

Probably a duplicate of ticket #2977.

comment:2 Changed 4 years ago by waterson

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

comment:3 Changed 3 years ago by dmethvin

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

Dup of #2977 (fixed).

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.