=== program/js/app.js
==================================================================
--- program/js/app.js	(revision 1893)
+++ program/js/app.js	(local)
@@ -219,8 +219,9 @@
           this.init_messageform();
 
         // show printing dialog
-        if (this.env.action=='print')
-          window.print();
+        if (this.env.action=='print'){
+	  window.onload = function(){window.print()};
+	}
 
         // get unread count for each mailbox
         if (this.gui_objects.mailboxlist)
