Skip to content
Permalink
Browse files
Dialog: Don't try to place the dialog next to itself on destroy. Fixe…
…s #8613 - Destroying a dialog removes the original element from the DOM.
  • Loading branch information
scottgonzalez committed Oct 1, 2012
1 parent 9b0c8b7 commit 4ab4684
Showing 1 changed file with 2 additions and 1 deletion.
@@ -216,7 +216,8 @@ $.widget("ui.dialog", {
}

next = oldPosition.parent.children().eq( oldPosition.index );
if ( next.length ) {
// Don't try to place the dialog next to itself (#8613)
if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
next.before( this.element );
} else {
oldPosition.parent.append( this.element );

0 comments on commit 4ab4684

Please sign in to comment.