Bug 31413

Summary: Set focus for cursor to Selector when adding a new audio alert
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: arthur.suzuki, lucas, martin.renvoize, oleonard, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04,22.05.11,21.11.19
Bug Depends on:    
Bug Blocks: 31411    
Attachments: Bug 31413: Set focus for cursor to Selector when adding a new audio alert
Bug 31413: Set focus for cursor to Selector when adding a new audio alert
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

Description Katrin Fischer 2022-08-18 22:10:08 UTC
When adding a new audio alert from the administration module, the focus should be on the first input field of the entry form: Selector
Comment 1 Katrin Fischer 2023-02-05 00:25:00 UTC
The focus class on the input field has no effect here. Owen, maybe you could take a look and make a suggestion?
Comment 2 Owen Leonard 2023-02-06 13:14:56 UTC
Created attachment 146266 [details] [review]
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

This patch adds a step to the process of displaying the new audio alert
form so that focus will be set to the first field when the form has
finished appearing. The typical "focus" class only works on elements
which are present in the initial DOM when the page is displayed.

To test, apply the patch and go to Administration -> Audio alerts.

Click the "New alert" button. When the form appears cursor focus should
be on the "Selector" field.

Also test the edit process: When editing an existing alert there should
not be automatic cursor focus.
Comment 3 Lucas Gass 2023-02-06 15:36:16 UTC
Created attachment 146279 [details] [review]
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

This patch adds a step to the process of displaying the new audio alert
form so that focus will be set to the first field when the form has
finished appearing. The typical "focus" class only works on elements
which are present in the initial DOM when the page is displayed.

To test, apply the patch and go to Administration -> Audio alerts.

Click the "New alert" button. When the form appears cursor focus should
be on the "Selector" field.

Also test the edit process: When editing an existing alert there should
not be automatic cursor focus.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2023-02-24 16:20:41 UTC
Created attachment 147355 [details] [review]
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

This patch adds a step to the process of displaying the new audio alert
form so that focus will be set to the first field when the form has
finished appearing. The typical "focus" class only works on elements
which are present in the initial DOM when the page is displayed.

To test, apply the patch and go to Administration -> Audio alerts.

Click the "New alert" button. When the form appears cursor focus should
be on the "Selector" field.

Also test the edit process: When editing an existing alert there should
not be automatic cursor focus.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 5 Tomás Cohen Arazi 2023-02-24 20:38:40 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-02-28 17:08:35 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 7 Lucas Gass 2023-03-08 13:59:51 UTC
Backported to 22.05.x for upcoming 22.05.11
Comment 8 Arthur Suzuki 2023-03-29 12:49:32 UTC
applied to 21.11 for 21.11.19
Comment 9 wainuiwitikapark 2023-04-27 05:32:52 UTC
Not backported to 21.05.x