Ticket #6137 (closed bug: fixed)
dialog('open') causes form elements to reset on IE7
| Reported by: | john.firebaugh | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.8.6 |
| Component: | ui.dialog | Version: | 1.8.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
If you use multiple dialogs on a page, and one has a form with radio buttons, on IE7 the checked radio button will reset to the default when the dialog is opened.
Test case:
test("dialog on IE7 should not reset form elements when opening", 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"); // Fails
d1.add(d2).remove();
})
Change History
comment:2 Changed 3 years ago by scott.gonzalez
- Status changed from new to closed
- Resolution set to fixed
- Component changed from ui.core to ui.dialog
- Milestone changed from TBD to 1.9
Fixed in e66cdfc.
comment:4 Changed 2 years ago by Scott González
Dialog: Don't change DOM position on open. Fixes #6137 - dialog('open') causes form elements to reset on IE7.
Changeset: 67b1db14c964418ce8b1fd760d54761040cc32af
comment:5 Changed 2 years ago by Scott González
Revert "Dialog: Don't change DOM position on open. Fixes #6137 - dialog('open') causes form elements to reset on IE7."
This reverts commit 67b1db14c964418ce8b1fd760d54761040cc32af.
Reverting so I can commit again with the proper author.
Changeset: c090802cc1f92736288dafbea95bb2783392975e
comment:6 Changed 2 years ago by John Firebaugh
Dialog: Don't change DOM position on open. Fixes #6137 - dialog('open') causes form elements to reset on IE7.
Changeset: e66cdfcf59f3a03bb3c49337f8c11da0a236b337


Pull request: http://github.com/jquery/jquery-ui/pull/24