From a0946d0364e9f87ea45777d2ab8d099ae0913647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 17 Oct 2011 08:26:12 -0400 Subject: [PATCH] Draggable: Remove all ids when using helper: true. --- ui/jquery.ui.draggable.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index ef6af1086..6abfe7a52 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -91,11 +91,11 @@ $.widget( "ui.draggable", { if ( this.options.helper ) { // clone if ( this.options.helper === true ) { - // If source element has an ID, change ID of helper to avoid overlap - this.dragEl = this.element.clone(); - if ( this.element.attr( "id" ) ) { - this.dragEl.attr( "id", this.element.attr( "id" ) + "-" + this.widgetName ); - } + this.dragEl = this.element.clone() + .removeAttr( "id" ) + .find( "[id]" ) + .removeAttr( "id" ) + .end(); } else { // TODO: figure out the signature for this; see #4957 this.dragEl = $( this.options.helper() );