jQueryUI Dialog + Firefox + ASP.Net = access to strict mode caller function is censored

This is kind of an old post, but this issue still occurred to me today. I didn't wanted to use the click of the button, so instead i tried a setTimeout and it also works.

To people having this issue, try this solution:

setTimeout(function() { __doPostBack('DateButton', $('#txtDate').val()); }, 1);

Having recently had to address this issue I found that I could solve the problem and get __doPostBack working in Edge, IE, Chrome & FireFox by adding the following script to the top of my app.

    if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { window.event = {}; }    

Using the SetTimeout function breaks Edge. Just putting in window.event={} broke IE.