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 4ab4684cfc36f8afe8782eb0501b51c420d478ae
Showing with 2 additions and 1 deletion.
  1. +2 −1 ui/jquery.ui.dialog.js
@@ -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.
You can’t perform that action at this time.