vistaprint / SkinnyJS

Slim little jQuery plugins
http://vistaprint.github.io/SkinnyJS
Other
41 stars 27 forks source link

IFrame modalDialog onclose event redirection #111

Open mainedufresne opened 7 years ago

mainedufresne commented 7 years ago

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();