Suppress the button action for static dialog openers
authorAlexander Ebert <ebert@woltlab.com>
Sat, 8 Dec 2018 19:01:02 +0000 (20:01 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 8 Dec 2018 19:01:02 +0000 (20:01 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js

index 1681f959c07c51426f102efb4fc7a959ec02b247..0a8222d160f2dfde446ac85d9d3a8e6213aa7942 100644 (file)
@@ -122,7 +122,11 @@ define(
                                                container.classList.remove('jsStaticDialogContent');
                                                elData(container, 'is-static-dialog', true);
                                                elHide(container);
-                                               button.addEventListener(WCF_CLICK_EVENT, this.openStatic.bind(this, container.id, null, { title: elData(container, 'title') }));
+                                               button.addEventListener(WCF_CLICK_EVENT, (function(event) {
+                                                       event.preventDefault();
+                                                       
+                                                       this.openStatic(container.id, null, { title: elData(container, 'title') });
+                                               }).bind(this));
                                        }).bind(this))(button, container);
                                }
                        }