Summary: | Middle clicking a title from search results creates two tabs or a new tab and a new window in Firefox | ||
---|---|---|---|
Product: | Koha | Reporter: | Benjamin Daeuber <bdaeuber> |
Component: | Staff interface | Assignee: | Nick Clemens <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | 1joynelson, david, gmcharlt, jonathan.druart, katrin.fischer, lucas, nick, oleonard |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes an issue in Firefox where middle-clicking or CTRL-clicking a title in the results screen of the staff client opens two new tabs.
|
Version(s) released in: |
20.05.00, 19.11.06, 19.05.11
|
Bug Depends on: | |||
Bug Blocks: | 25027 | ||
Attachments: |
Bug 23601: Prevent default for auxclick
Bug 23601: Prevent default for auxclick Bug 23601: Prevent default for auxclick |
Description
Benjamin Daeuber
2019-09-12 21:42:20 UTC
I've noticed this before too, but have never taken a hard look at a solution. It has something to do with the click handler added by the "browse search results" buttons. I just tested and things seem to work ok now - please reopen if you can still see the buggy behavior! Still happens for me Created attachment 102089 [details] [review] 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 Thx Nick! Created attachment 102102 [details] [review] 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> Tested on Ubuntu 18.04 with Firefox 74.0 and Firefox Developer Edition 75.0b11 (64-bit editions). I cannot recreate that (Firefox 68.4.1esr) (In reply to Jonathan Druart from comment #8) > I cannot recreate that (Firefox 68.4.1esr) I do on Firefox 74.0 (In reply to Nick Clemens from comment #9) > (In reply to Jonathan Druart from comment #8) > > I cannot recreate that (Firefox 68.4.1esr) > > I do on Firefox 74.0 Wait, I actually do! Lucky me! Created attachment 102141 [details] [review] 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> Let's do fix that correctly, please? See bug 25027. Nice work everyone! Pushed to master for 20.05 backported to 19.11.x for 19.11.06 backported to 19.05.x for 19.05.11 |