Bugzilla – Attachment 102141 Details for
Bug 23601
Middle clicking a title from search results creates two tabs or a new tab and a new window in Firefox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23601: Prevent default for auxclick
Bug-23601-Prevent-default-for-auxclick.patch (text/plain), 1.71 KB, created by
Jonathan Druart
on 2020-03-31 14:23:35 UTC
(
hide
)
Description:
Bug 23601: Prevent default for auxclick
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-31 14:23:35 UTC
Size:
1.71 KB
patch
obsolete
>From fe1a32badc1cc8b43fd321d5352c1d8f4fa76187 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 30 Mar 2020 15:16:36 +0000 >Subject: [PATCH] Bug 23601: Prevent default for auxclick > >The issue appears to be that the default action is not prevented for middle click because it registers >an 'auxclick' event as opposed to a 'click' event > >To test: >1 - Perform a search in staff client >2 - Shift-click and hold on a result >3 - Note a new tab opens >4 - Release the click, no change >5 - Middle click and hold on a result >6 - New tab opens >7 - Release, a second new tab opens >8 - Apply patch >9 - Reload page >10 - Middle click and hold >11 - New tab opens >12 - Release >13 - No new tab > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/js/browser.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js >index 09f1d02d38..5763c7c3e6 100644 >--- a/koha-tmpl/intranet-tmpl/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/js/browser.js >@@ -65,7 +65,7 @@ KOHA.browser = function (searchid, biblionumber) { > sessionStorage.setItem('searches', JSON.stringify(searches)); > $(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) { >+ $('#searchresults table tr a[href*="/detail.pl"]').on('click auxclick', function (ev) { > ev.preventDefault(); > }); > $('#searchresults table tr a[href*="/detail.pl"]').on('mousedown', function (ev) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23601
:
102089
|
102102
| 102141