Bug 31413 - Set focus for cursor to Selector when adding a new audio alert
Summary: Set focus for cursor to Selector when adding a new audio alert
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 31411
  Show dependency treegraph
 
Reported: 2022-08-18 22:10 UTC by Katrin Fischer
Modified: 2023-12-28 20:43 UTC (History)
5 users (show)

See Also:
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


Attachments
Bug 31413: Set focus for cursor to Selector when adding a new audio alert (1.46 KB, patch)
2023-02-06 13:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31413: Set focus for cursor to Selector when adding a new audio alert (1.51 KB, patch)
2023-02-06 15:36 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31413: Set focus for cursor to Selector when adding a new audio alert (1.57 KB, patch)
2023-02-24 16:20 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 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