From 4cc903fb75bd2f64688dc3c8e8f9232b78098f65 Mon Sep 17 00:00:00 2001 From: Benjamin Attal Date: Mon, 2 Jun 2014 18:34:44 -0400 Subject: [PATCH] Prevent page from scrolling to top when next match is clicked. --- static/js/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/index.js b/static/js/index.js index e8901de..d9af97c 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -231,6 +231,7 @@ function createResult(codelet) { $(nextMatch).click(function(e) { e.stopPropagation() + e.preventDefault() cur_match = cur_match >= matches.length - 1 ? 0 : cur_match + 1; newMatch(); });