Skip to content

Commit bc921df

Browse files
committed
Merge pull request jquery#4 from scottgonzalez/interactions
Draggable: Remove all ids when using helper: true.
2 parents 1cb5b87 + a0946d0 commit bc921df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ui/jquery.ui.draggable.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ $.widget( "ui.draggable", {
9191
if ( this.options.helper ) {
9292
// clone
9393
if ( this.options.helper === true ) {
94-
// If source element has an ID, change ID of helper to avoid overlap
95-
this.dragEl = this.element.clone();
96-
if ( this.element.attr( "id" ) ) {
97-
this.dragEl.attr( "id", this.element.attr( "id" ) + "-" + this.widgetName );
98-
}
94+
this.dragEl = this.element.clone()
95+
.removeAttr( "id" )
96+
.find( "[id]" )
97+
.removeAttr( "id" )
98+
.end();
9999
} else {
100100
// TODO: figure out the signature for this; see #4957
101101
this.dragEl = $( this.options.helper() );

0 commit comments

Comments
 (0)