From e80bd63b06e23ec5e98ba39f0ad4133339ac7534 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 28 May 2015 09:42:16 +0000 Subject: [PATCH] Bind the load event only once (.one), seems the jQuery(.on)+IE calls load event on an iframe twice --- mail/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 970fa8acde..c53b4199f3 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -177,7 +177,7 @@ app.classes.mail = AppJS.extend( // Prepare display dialog for printing // copies iframe content to a DIV, as iframe causes // trouble for multipage printing - jQuery('#mail-display_mailDisplayBodySrc').on('load', function(){self.mail_prepare_print();}); + jQuery('#mail-display_mailDisplayBodySrc').one('load', function(){self.mail_prepare_print();}); this.mail_isMainWindow = false; this.mail_display(); @@ -780,7 +780,7 @@ app.classes.mail = AppJS.extend( if (window.location.search.search('&print=') >= 0) { var that = this; - jQuery('#mail-display_mailDisplayBodySrc').bind('load',function(){that.mail_print();}); + jQuery('#mail-display_mailDisplayBodySrc').one('load',function(){that.mail_print();}); } },