Skip to content

Commit 0dc4a48

Browse files
committed
Dialog: Append the dialog to the body early to make sure styles from the classes get applied.
1 parent 954419f commit 0dc4a48

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ui/jquery.ui.dialog.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ $.widget("ui.dialog", {
108108
})
109109
.mousedown(function( event ) {
110110
self.moveToTop( false, event );
111-
}),
111+
})
112+
.appendTo( "body" ),
112113

113114
uiDialogContent = self.element
114115
.show()
@@ -155,8 +156,6 @@ $.widget("ui.dialog", {
155156
self._createButtons( options.buttons );
156157
self._isOpen = false;
157158

158-
uiDialog.appendTo( document.body );
159-
160159
if ( $.fn.bgiframe ) {
161160
uiDialog.bgiframe();
162161
}

0 commit comments

Comments
 (0)