Bug 29613 - Set focus for cursor to barcode field on course reserves add items and batch add items pages
Summary: Set focus for cursor to barcode field on course reserves add items and batch ...
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: 21.05
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-01 16:54 UTC by Eliana
Modified: 2022-12-12 21:23 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Screenshot of current behavior (27.61 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-12-01 16:55 UTC, Eliana
Details
Screenshot of current behavior (16.20 KB, image/png)
2021-12-03 13:26 UTC, Owen Leonard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eliana 2021-12-01 16:54:20 UTC
When clicking on the "Add reserves" or "batch add reserves" buttons in the course reserves module, the cursor focuses on the catalog search bar instead of the box where you scan in the barcodes. I fixed this locally by adding the following to IntranetUserJS:

//Switch active cursor to correct box for adding course reserves
$(document).ready(function(){
if (window.location.href.indexOf("cgi-bin/koha/course_reserves/add_items.pl") > -1) {
 $('#barcode').focus();
}
});

$(document).ready(function(){
if (window.location.href.indexOf("cgi-bin/koha/course_reserves/batch_add_items.pl") > -1) {
 $('#barcodes').focus();
}
});
Comment 1 Eliana 2021-12-01 16:55:25 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-12-03 13:26:01 UTC
Created attachment 128213 [details]
Screenshot of current behavior
Comment 3 Owen Leonard 2021-12-03 14:57:20 UTC
I can't reproduce this problem in master or 21.05.x
Comment 4 Katrin Fischer 2022-01-09 00:13:20 UTC
Same for me, I tested this on 20.11 and the current development version. The cursor is always in the barcode field for me.

Eliana, please provide your exact version if this problem still persists. Please also try to remove all your changes from OpacUserJs and test without them to make sure it's not another change interfering.
Comment 5 Eliana 2022-01-10 14:52:50 UTC
Katrin was right, it was another bit of our JQuery that was causing this issue. My bad! This bug is no long relevant.
Comment 6 Katrin Fischer 2022-01-12 12:19:20 UTC
Thx for the feedback, Eliana, had this happen myself before.