From 7c194dc49a2cfa9e6713903bf7a1107cef73750c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Apr 2015 09:42:40 +0200 Subject: [PATCH] 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). --- 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 -- 2.1.0