Fixed close function for dialogs
authorAlexander Ebert <ebert@woltlab.com>
Mon, 14 Nov 2011 18:16:07 +0000 (19:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 14 Nov 2011 18:16:07 +0000 (19:16 +0100)
wcfsetup/install/files/js/WCF.js

index 69f659d83300d2025fdf714cdf6d1092c40aa314..8aa22c5c00a5135a1a81ce00cb90b2b55d27f382 100644 (file)
@@ -3239,9 +3239,10 @@ $.widget('ui.wcfAJAXDialog', $.ui.dialog, {
                        effect: 'fade'
                };
                
-               this.options.close = function(event, ui) {
-                       // loading ajax content seems to block properly closing
-                       $(this).parent('.ui-dialog').empty().remove();
+               this.options.close = function() {
+                       // "display: inline-block" is set by stylesheet, but additionally flagged
+                       // with important, thus we have to force the dialog to stay hidden
+                       $(this).parent('.ui-dialog').css({ display: 'none !important'});
                };
                
                if (this.options.preventClose) {