Add preventDefault() to prevent page jumping
authorChristopher Walz <chris@cwalz.de>
Mon, 30 Jan 2017 02:23:54 +0000 (11:23 +0900)
committerChristopher Walz <chris@cwalz.de>
Mon, 30 Jan 2017 02:23:54 +0000 (11:23 +0900)
com.woltlab.wcf/templates/footer.tpl

index cf6796075ed5f4fdc29f4ddb952d7250ec6d1935..3e417123d370ac36d95bbaafd40e1a58e12dc63e 100644 (file)
                                <a href="{page}com.woltlab.wcf.CookiePolicy{/page}" class="button buttonPrimary small cookiePolicyNoticeMoreInformation">{lang}wcf.page.cookiePolicy.info.moreInformation{/lang}</a>
                                <a href="#" class="button small jsOnly cookiePolicyNoticeDismiss">{lang}wcf.global.button.close{/lang}</a>
                                <script data-relocate="true">
-                                       elBySel('.cookiePolicyNoticeDismiss').addEventListener(WCF_CLICK_EVENT, function() {
+                                       elBySel('.cookiePolicyNoticeDismiss').addEventListener(WCF_CLICK_EVENT, function(event) {
+                                               event.preventDefault();
+
                                                elRemove(elBySel('.cookiePolicyNotice'));
                                        });
                                </script>