Bug 22768 - Global search forms' keyboard navigation broken
Summary: Global search forms' keyboard navigation broken
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 23169 (view as bug list)
Depends on: 22045
Blocks: 22399
  Show dependency treegraph
 
Reported: 2019-04-24 16:29 UTC by Owen Leonard
Modified: 2019-08-13 19:48 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03


Attachments
Bug 22768: Global search form keyboard navigation broken (3.41 KB, patch)
2019-06-19 17:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22768: Global search form keyboard navigation broken (3.47 KB, patch)
2019-07-12 13:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22768: Global search form keyboard navigation broken (3.52 KB, patch)
2019-07-12 13:20 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 22768: Global search form keyboard navigation broken (3.57 KB, patch)
2019-07-12 18:09 UTC, Nadine Pierre
Details | Diff | Splinter Review
Bug 22768: Global search form keyboard navigation broken (3.64 KB, patch)
2019-07-13 10:47 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-04-24 16:29:26 UTC
Dobrica's comment from Bug 22045:

This bug broke keyboard shortcuts because of following change:

--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js
@@ -31,7 +31,7 @@ $.fn.tabIndex = function () {
     return $(this).parent().children('div').index(this);
 };
 $.fn.selectTabByID = function (tabID) {
-    $(this).tabs("option", "active", $(tabID).tabIndex());
+    $(this).tabs("option", "active", $( "#" + tabID ).tabIndex());
 };

  $(document).ready(function() {

without modification to calling which also prefix tabID with #, thus creating invalid ##tabID
Comment 1 Owen Leonard 2019-06-19 17:06:39 UTC
Created attachment 90810 [details] [review]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)
Comment 2 Owen Leonard 2019-06-20 11:54:22 UTC
*** Bug 23169 has been marked as a duplicate of this bug. ***
Comment 3 Owen Leonard 2019-07-12 13:11:47 UTC
Created attachment 91486 [details] [review]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)
Comment 4 Claire Gravely 2019-07-12 13:20:09 UTC
Created attachment 91487 [details] [review]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 5 Nadine Pierre 2019-07-12 18:09:53 UTC
Created attachment 91502 [details] [review]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Comment 6 Katrin Fischer 2019-07-13 10:47:44 UTC
Created attachment 91518 [details] [review]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Martin Renvoize 2019-07-15 11:51:20 UTC
Nice work!

Pushed to master for 19.11.00
Comment 8 Fridolin SOMERS 2019-08-06 13:38:19 UTC
Pushed to 19.05.x for 19.05.03
Comment 9 Lucas Gass 2019-08-13 19:48:19 UTC
missing dependencies, wont backport to 18.11.x