| Summary: | Set focus for cursor to item type input box when creating new item types | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Barbara Johnson <barbara.johnson> | 
| Component: | Templates | Assignee: | Andreas Roussos <a.roussos> | 
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> | 
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | a.roussos, aleisha, andrew, caroline.cyr-la-rose, fridolin.somers, gmcharlt, jonathan.druart, victor | 
| Version: | Main | Keywords: | Academy | 
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 | 
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | 21.05.00,20.11.03,20.05.09,19.11.15 | Circulation function: | |
| Attachments: | Bug 27192: Automatically set focus to the item type input box Bug 27192: Automatically set focus to the item type input box Bug 27192: Automatically set focus to the item type input box Bug 27192: Automatically set focus to the item type input box Bug 27192: Automatically set focus to the item type input box | ||
| 
        
          Description
        
        
          Barbara Johnson
        
        
        
        
          2020-12-10 16:09:33 UTC
        
       Created attachment 114968 [details] [review] Bug 27192: Automatically set focus to the item type input box When adding a new item type, you have to click inside the "Ιtem type:" input box before you can start entering text. This patch fixes that by adding the "focus" class to the relevant <input> element so that cursor focus is set when the page loads. Test plan: 1) Try to add a new item type: notice how you have to manually click inside the "Item type:" input box before you start typing. 2) Apply this patch. 3) Repeat step 1) -- this time the "Item type:" input box should gain focus automatically. I based my patch on Owen Leonard's work in Bug 26694 -- Thank you Owen! Created attachment 115105 [details] [review] Bug 27192: Automatically set focus to the item type input box When adding a new item type, you have to click inside the "Ιtem type:" input box before you can start entering text. This patch fixes that by adding the "focus" class to the relevant <input> element so that cursor focus is set when the page loads. Test plan: 1) Try to add a new item type: notice how you have to manually click inside the "Item type:" input box before you start typing. 2) Apply this patch. 3) Repeat step 1) -- this time the "Item type:" input box should gain focus automatically. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Created attachment 115225 [details] [review] Bug 27192: Automatically set focus to the item type input box When adding a new item type, you have to click inside the "Ιtem type:" input box before you can start entering text. This patch fixes that by adding the "focus" class to the relevant <input> element so that cursor focus is set when the page loads. Test plan: 1) Try to add a new item type: notice how you have to manually click inside the "Item type:" input box before you start typing. 2) Apply this patch. 3) Repeat step 1) -- this time the "Item type:" input box should gain focus automatically. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 115254 [details] [review] Bug 27192: Automatically set focus to the item type input box When adding a new item type, you have to click inside the "Ιtem type:" input box before you can start entering text. This patch fixes that by adding the "focus" class to the relevant <input> element so that cursor focus is set when the page loads. Test plan: 1) Try to add a new item type: notice how you have to manually click inside the "Item type:" input box before you start typing. 2) Apply this patch. 3) Repeat step 1) -- this time the "Item type:" input box should gain focus automatically. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Amy King <amyking386@gmail.com> Created attachment 115256 [details] [review] Bug 27192: Automatically set focus to the item type input box When adding a new item type, you have to click inside the "Ιtem type:" input box before you can start entering text. This patch fixes that by adding the "focus" class to the relevant <input> element so that cursor focus is set when the page loads. Test plan: 1) Try to add a new item type: notice how you have to manually click inside the "Item type:" input box before you start typing. 2) Apply this patch. 3) Repeat step 1) -- this time the "Item type:" input box should gain focus automatically. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Thx Amy :) Shouldn't it be implemented for the "edit" action as well? Focus would be on "Parent item type". Owen answered me on IRC: oleonard> The suggestion is logical, but from the point of view of a sighted user, focus on a <select> is much less obvious. There is also the question of whether the user really wants to edit all fields starting from the beginning, or whether they're looking for a particular field to change. oleonard> My inclination is to leave it as it is for the edit action. Pushed to master for 21.05, thanks to everybody involved! Super small enhancement, I choose to backport. Pushed to 20.11.x for 20.11.03 Following Frido, backporting to 20.05.x for 20.05.09 Backported: Pushed to 19.11.x branch for 19.11.15 |