Skip to content

Node.js based forum software built for the modern web

added a preventDefault when href="#" or data-ajaxify="false", so page doesn't send user back to top (which is kind of annoying), but not sure if this may introduce side-effects. @barisusakli @psychobunny

Julian Lam57d45518bdc7
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index cc7c0cbff1..d2af431176 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -276,7 +276,7 @@ $(document).ready(function() {
// Enhancing all anchors to ajaxify...
$(document.body).on('click', 'a', function (e) {
if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:' || $(this).attr('data-ajaxify') === 'false') {
- return;
+ return e.preventDefault();
}
if (!window.location.pathname.match(/\/(403|404)$/g)) {