The dialog box will close but the redirect will not happen.
Workaround is to add a timeout to the redirect such as:
$.modalDialog.create({ url: '/some/url', onclose: function(e) { window.setTimeout(function() { document.location.href ='http://www.google.com'; console.log(document.location); }, 1) } }).open();
One is unable to issue a redirect upon closing the dialog box using the onclose event.
$.modalDialog.create({ url: '/some/url', onclose: function(e) { document.location.href ='http://www.google.com'; console.log(document.location); } }).open();
The dialog box will close but the redirect will not happen.
Workaround is to add a timeout to the redirect such as:
$.modalDialog.create({ url: '/some/url', onclose: function(e) { window.setTimeout(function() { document.location.href ='http://www.google.com'; console.log(document.location); }, 1) } }).open();