mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Don't change DOM position on open. Fixes #6137 - dialog('open') causes form elements to reset on IE7.
This commit is contained in:
parent
d7670b9407
commit
67b1db14c9
@ -61,4 +61,21 @@ test("#5531: dialog width should be at least minWidth on creation", function ()
|
||||
|
||||
});
|
||||
|
||||
test("#6137: dialog('open') causes form elements to reset on IE7", function() {
|
||||
expect(2);
|
||||
|
||||
d1 = $('<form><input type="radio" name="radio" id="a" value="a" checked="checked"></input>' +
|
||||
'<input type="radio" name="radio" id="b" value="b">b</input></form>').dialog({autoOpen: false});
|
||||
|
||||
d1.find('#b')[0].checked = true;
|
||||
equal($('input:checked').val(), 'b', "checkbox b is checked");
|
||||
|
||||
d2 = $('<div></div>').dialog({autoOpen: false});
|
||||
|
||||
d1.dialog('open');
|
||||
equal($('input:checked').val(), 'b', "checkbox b is checked");
|
||||
|
||||
d1.add(d2).remove();
|
||||
})
|
||||
|
||||
})(jQuery);
|
||||
|
3
ui/jquery.ui.dialog.js
vendored
3
ui/jquery.ui.dialog.js
vendored
@ -309,9 +309,6 @@ $.widget("ui.dialog", {
|
||||
uiDialog = self.uiDialog;
|
||||
|
||||
self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
|
||||
if (uiDialog.next().length) {
|
||||
uiDialog.appendTo('body');
|
||||
}
|
||||
self._size();
|
||||
self._position(options.position);
|
||||
uiDialog.show(options.show);
|
||||
|
Loading…
Reference in New Issue
Block a user