Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer crash on closing jQuery UI dialog due to new IE update (KB2761451)

We are using jQuery UI Dialog to insert data into the database. When the jQuery dialog is going to close on submit the IE hanged and showing a message: "IE stopped working". The issue is caused due to an update "Cumulative Security Update for Internet Explorer 9 for Windows 7 for x64-based Systems (KB2761451)". I have confirmed by uninstall this specific update the issue is resolved.

I am using following line of code to close the dialog

 $('#' + dialogName).dialog('close'); 

To uninstall the IE Update is not a permanent solution. how can I fix this issue permanently ????

like image 599
yasii Avatar asked Nov 28 '12 13:11

yasii


2 Answers

You can't call .dialog() before the DOM is ready in IE. Move your call to test() instead of $(document).ready();

like image 130
Suresh Sekar Avatar answered Nov 16 '22 03:11

Suresh Sekar


I have the same issue, but in my case there were 3 required conditions:

1) using jquery-ui 1.10.3 (with 1.9.2 it works fine)

2) in the page's init script there were script, that adds a form to the body:

jQuery('<form id="frmId" method="post" action="page.aspx"></form>')
    .appendTo("body");

3) show modal dialog:

$("<div/>").dialog({modal});

Removing any of this condition solved this issue for me :)

And, the example at jsfiddle.net: http://jsfiddle.net/Zm3Qm/1/

like image 33
ka3yc Avatar answered Nov 16 '22 02:11

ka3yc