Fix a race condition when calling close() and showHtml() in one context makes
authorJan Schneider <jan@horde.org>
Wed, 10 Mar 2010 22:57:01 +0000 (23:57 +0100)
committerJan Schneider <jan@horde.org>
Wed, 10 Mar 2010 22:57:22 +0000 (23:57 +0100)
the appear and fade effects eliminate each other.

horde/js/redbox.js

index bfc8596..2ae9947 100644 (file)
@@ -54,7 +54,7 @@ var RedBox = {
     close: function()
     {
         $('RB_window').fade({ duration: 0.4 });
-        if (this.overlay) {
+        if (this.overlay && this.overlayVisible()) {
             $('RB_overlay').fade({ duration: 0.4 });
         }
     },