Fixed closing of dialogs
authorAlexander Ebert <ebert@woltlab.com>
Sun, 14 Apr 2013 13:19:41 +0000 (15:19 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 14 Apr 2013 13:19:41 +0000 (15:19 +0200)
wcfsetup/install/files/js/WCF.js

index bf102718fa0a094826e7ab891847c5ad6bb2099f..fc7eacc28ff380d5dbe92204c95e788c96f489ec 100755 (executable)
@@ -7828,8 +7828,10 @@ $.widget('ui.wcfDialog', {
        
        /**
         * Closes this dialog.
+        * 
+        * @param       object          event
         */
-       close: function() {
+       close: function(event) {
                if (!this.isOpen() || !this.options.closable) {
                        return;
                }
@@ -7848,6 +7850,12 @@ $.widget('ui.wcfDialog', {
                if (this.options.onClose !== null) {
                        this.options.onClose();
                }
+               
+               if (event !== undefined) {
+                       event.preventDefault();
+                       event.stopPropagation();
+                       return false;
+               }
        },
        
        /**