Bug Tracker

Ticket #2653 (closed bug: wontfix)

Opened 8 months ago

Last modified 6 months ago

clone() and ID attribute

Reported by: chrishandorf Assigned to: flesler
Type: bug Priority: minor
Milestone: 1.3 Component: core
Version: 1.2.3 Keywords:
Cc: Needs: Review

Description

The clone() function as well as the jQuery UI "helper:clone" function will also clone the ID attribute of the original. So 2 objects in the browser now have same ID. This caused me some problems with drag and drop when using helper:clone.

It seems to me that the clone() function should automatically clear the ID attribute (if any) on all elements that are cloned.

Attachments

Change History

follow-up: ↓ 2   Changed 7 months ago by flesler

  • owner set to flesler
  • status changed from new to assigned

The problem shouldn't arise until you actually append the element, which doesn't always happen.

What do you guys think ?

in reply to: ↑ 1   Changed 7 months ago by chrishandorf

Replying to flesler:

The problem shouldn't arise until you actually append the element, which doesn't always happen. What do you guys think ?

Sorry for the trouble - I think I have worked around this problem and its probably a good thing the id isn't cleared by helper:clone. If it was then how would I know what the ID of the original object that started the drag was?

  Changed 6 months ago by flesler

  • status changed from assigned to closed
  • resolution set to wontfix
  • milestone changed from 1.2.4 to 1.3

Right ok.

Note: See TracTickets for help on using tickets.