diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 808d31d5b..46fc7adf4 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -676,7 +676,7 @@ $.widget("ui.dialog", { // reuse old instances due to IE memory leak with alpha transparency (see #5185) var $el = this.overlay = ( $.ui.dialog.overlay.oldInstances.pop() || $( "
" ).addClass( "ui-widget-overlay ui-front" ) ); - $el.appendTo( document.body ); + $el.appendTo( this.document[ 0 ].body ); this._on( $el, { mousedown: "_keepFocus"