From 491e0002ca449b572448124fbf4340d885a05208 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 9 Sep 2014 13:55:43 +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 4e0ac35d66..c884313c04 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -3741,7 +3741,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 {