Improved modal handling
authorAlexander Ebert <ebert@woltlab.com>
Wed, 28 Sep 2016 10:40:34 +0000 (12:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 28 Sep 2016 10:40:34 +0000 (12:40 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabModal.js

index db2f9b7971965b37183afa8de73ddafc7abf5944..1b72adabf0c23b89300703e040c50038b8e81cf2 100644 (file)
@@ -13,8 +13,8 @@ $.Redactor.prototype.WoltLabModal = function() {
                        this.selection.restore();
                        
                        // avoid calling `close()` without any dialogs opened before
-                       if (_uiDialog.getDialog(this)) {
-                               _uiDialog.close(this);
+                       if (_uiDialog.getDialog('redactorOverlay-' + this.uuid)) {
+                               _uiDialog.close('redactorOverlay-' + this.uuid);
                        }
                },