diff options
-rw-r--r-- | ui/jquery.ui.dialog.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index bcbb68c5a..77424047c 100644 --- a/ui/jquery.ui.dialog.js +++ b/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 ); |