Today I have came by a very strange behavior that was blocking up a dialog to show just prior to the ajax to load. The ajax was binded to a click event and on the ajax beforeSend I had:
In theory the beforeSend event will be triggered every time for the ajax call, but, if you have
async: false in the ajax call, this will never work for Chrome and IE. Reason is that the beforeSend for both Chrome and IE happens after the ajax is completely done and at that point, my afterSend took over and closed the dialog.
Off course changing it to
async: true will make the dialog to open immediately, but it is not on every ajax request that you want to make it
async: true. Take for example when you really want block everything else until the element is fully loaded.
Anyway, there are several ways to solve the issue but if async:true works for you, that is all you need to do.