From be3e1f3e80d1e0fa93416e54d056da5b576e8f45 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 9 Sep 2014 14:13:32 +0000 Subject: [PATCH] * Mail/Chrome: Fix not closing print dialog in compose after print or cancel in Chrome --- mail/js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mail/js/app.js b/mail/js/app.js index e2d534c49a..0cb71031c2 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -3738,7 +3738,10 @@ app.classes.mail = AppJS.extend( if (!window.onafterprint) { - window.onfocus = afterprint; + // For browsers which does not support onafterprint event, eg. Chrome + setTimeout(function() { + window.close(); + }, 2000); } else {