From 57d45518bdc71e50654802116e189680ac478d16 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 10 Feb 2015 11:16:24 -0500 Subject: [PATCH] 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 --- public/src/ajaxify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {