From 7a848ae42abf520a8aad126444935c77472a7ea3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Apr 2015 09:42:40 +0200 Subject: [PATCH] [PASSED QA] Bug 11890: Prevent default on click event It seems that the previous patch does not stop the propagation of the event if the link is clicked with the left button (which=1). Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/js/browser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js index 81033ea..824e409 100644 --- a/koha-tmpl/intranet-tmpl/js/browser.js +++ b/koha-tmpl/intranet-tmpl/js/browser.js @@ -61,6 +61,9 @@ KOHA.browser = function (searchid, biblionumber) { $.cookie(me.searchid, JSON.stringify(me.searchCookie), { path: '/' }); $(document).ready(function () { //FIXME It's not a good idea to modify the click events + $('#searchresults table tr a[href*="detail.pl"]').on('click', function (ev) { + ev.preventDefault(); + }); $('#searchresults table tr a[href*="detail.pl"]').on('mousedown', function (ev) { if ( ev.which == 2 || ev.which == 1 && ev.ctrlKey ) { // Middle click or ctrl + click -- 1.9.1