Skip to content

Node.js based forum software built for the modern web

fixing issue where notifications toggle was causing an ajaxify

Julian Lam7a1e1b5b6062
diff --git a/public/src/forum/footer.js b/public/src/forum/footer.js
index d38896cce9..34b7a1ea73 100644
--- a/public/src/forum/footer.js
+++ b/public/src/forum/footer.js
@@ -86,7 +86,8 @@
var notifContainer = document.getElementsByClassName('notifications')[0],
notifTrigger = notifContainer.querySelector('a'),
notifList = document.getElementById('notif-list');
- notifTrigger.addEventListener('click', function() {
+ notifTrigger.addEventListener('click', function(e) {
+ e.preventDefault();
if (notifContainer.className.indexOf('open') === -1) socket.emit('api:notifications.get');
});
notifList.addEventListener('click', function(e) {