Dialog: Append the dialog to the body early to make sure styles from the classes get applied.

This commit is contained in:
Scott González 2011-07-12 09:16:03 -04:00
parent 954419f94e
commit 0dc4a48762

View File

@ -108,7 +108,8 @@ $.widget("ui.dialog", {
}) })
.mousedown(function( event ) { .mousedown(function( event ) {
self.moveToTop( false, event ); self.moveToTop( false, event );
}), })
.appendTo( "body" ),
uiDialogContent = self.element uiDialogContent = self.element
.show() .show()
@ -155,8 +156,6 @@ $.widget("ui.dialog", {
self._createButtons( options.buttons ); self._createButtons( options.buttons );
self._isOpen = false; self._isOpen = false;
uiDialog.appendTo( document.body );
if ( $.fn.bgiframe ) { if ( $.fn.bgiframe ) {
uiDialog.bgiframe(); uiDialog.bgiframe();
} }