Skip to content

Commit

Permalink
fix(search): avoid unneccesary double link navigation
Browse files Browse the repository at this point in the history
Results in search responses which got an URL to be followed when clicked on it, are followed twice: First by the click event handler of a result and second by the native a link behavior
  • Loading branch information
lubber-de authored Aug 25, 2020
1 parent 2ddcc7b commit c35b4b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/definitions/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ $.fn.search = function(parameters) {
}
module.hideResults();
if(href) {
event.preventDefault();
module.verbose('Opening search link found in result', $link);
if(target == '_blank' || event.ctrlKey) {
window.open(href);
Expand Down

0 comments on commit c35b4b1

Please sign in to comment.