Dialog, IE6 and Checkboxes

Dialog, IE6 and Checkboxes

All,
I wanted to open this for discussion before I submitted it as a bug.
This is the scenario in which this issue is applicable:
- dialog container has <input type="checkbox"/> elements.
- dialog plugin is initialized on the container upon document.ready,
but is not shown automatically - rather, on demand.
- before the dialog is opened, the checked state of the checkboxes are
modified.
The offending line in this case is:
Line 223: (uiDialog.next().length && uiDialog.appendTo('body'));
It's a known fact that when working with IE, the checked state of
checkboxes lose their state when they are appended [anywhere]. The
result of Line 223 is that whatever checked states are set after the
dialog has been initialized in document.ready, are lost whenever the
dialog is shown. It's fairly safe to say that this is unexpected. It's
an extremely common practice and just good usability habit that form
elements (on any platform) are set prior to the form being shown. This
issue makes that practice impossible to implement.
This has also cropped up in the past when I was attempting to get
TinyMCE to work with the jQuery UI dialog. Richard and I had narrowed
the issue down to that additional append to body. I understand that in
the past the argument for always appending to body was to assure that
the dialog was the topmost element in browsers like IE6. However,
appending to the body each time the dialog is opened is creating more
issues in itself. There is also a very minute matter of this causing
a slight performance drop. I commented out that line just for testing,
following the scenario above, and when opening the dialog with that
additional append to body, the time to open the dialog increased by
(numbers are rounded):
Firefox 3.5.5: 120ms
IE6: 400ms
IE7: 450ms
IE8: 230ms
Chrome: 80ms
Thanks,
Andrew
--