Bug #9511: Make sure DimpCompose.onDomLoad() has run before doing other actions
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 14 Jan 2011 18:47:55 +0000 (11:47 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 14 Jan 2011 18:47:55 +0000 (11:47 -0700)
imp/js/compose-dimp.js

index a328885..237944d 100644 (file)
@@ -523,7 +523,7 @@ var DimpCompose = {
     // opts = auto, focus, fwd_list, noupdate, priority, show_editor
     fillForm: function(msg, header, opts)
     {
-        if (!document.loaded) {
+        if (!document.loaded || !$('pageContainer').visible()) {
             this.fillForm.bind(this, msg, header, opts).defer();
             return;
         }
@@ -792,7 +792,7 @@ var DimpCompose = {
             return;
         }
 
-        if (!document.loaded) {
+        if (!document.loaded || !$('pageContainer').visible()) {
             this.resizeMsgArea.bind(this).defer();
             return;
         }