jQuery Dialog breaking in IE 8 Compatibility Mode

jQuery Dialog breaking in IE 8 Compatibility Mode

I'm using a modal dialog on my page and I get this error in IE 8 Compatibility Mode:

Error KB927917 in IE8: Unable to modify the parent container element before the child element is closed.

The container for this dialog is defined like so:

  1. <div id="dialog" title="Enter amount"> <p id="validateTips"></p> <form> <input type="text"name="amount" id="amount"/> </form> </div>
Then in $(document).ready() I call:
  1. $('#dialog').dialog('open');
The $("#dialog").dialog({...}) has some basic functionality in it that I know works fine. Even when I take out all the code from $("#dialog").dialog({...}) I still get the error but when I either remove the function or remove the div container I don't get it anymore.

Does anybody have any ideas on how to fix this? Btw my page runs fine in Firefox, IE 7, and IE 8 Comp Mode off.