Bug 29055

Summary: Focus on keyword field when subscription biblio search window opens
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: arthur.suzuki, lucas, victor
Version: MainKeywords: Academy
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:
22.11.00, 22.05.04, 21.11.11
Circulation function:
Attachments: Bug 29055: Focus on keyword field when subscription biblio search window opens
Bug 29055: Focus on keyword field when subscription biblio search window opens
Bug 29055: Focus on keyword field when subscription biblio search window opens

Description Aleisha Amohia 2021-09-20 04:21:11 UTC
To reproduce:
1. Go to Serials and Add a new subscription
2. Search for a record
3. There is only one search field (keyword), and you have to click into it to use it. It should be focussed as the window opens so the cursor starts in there.
Comment 1 Owen Leonard 2022-05-12 15:21:53 UTC
Created attachment 134929 [details] [review]
Bug 29055: Focus on keyword field when subscription biblio search window opens

This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.
Comment 2 David Nind 2022-05-13 00:51:11 UTC
Created attachment 134939 [details] [review]
Bug 29055: Focus on keyword field when subscription biblio search window opens

This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Victor Grousset/tuxayo 2022-05-15 22:39:50 UTC
Works, qa script happy, code looks good, passing QA :)
Comment 4 Victor Grousset/tuxayo 2022-05-15 22:49:10 UTC
Created attachment 135010 [details] [review]
Bug 29055: Focus on keyword field when subscription biblio search window opens

This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Tomás Cohen Arazi (tcohen) 2022-06-25 14:17:59 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass (lukeg) 2022-07-29 16:11:11 UTC
Backported to 22.05.x for 22.05.04
Comment 7 Arthur Suzuki 2022-08-11 11:52:19 UTC
backported to 21.11.x for 21.11.11
Comment 8 Victor Grousset/tuxayo 2022-08-13 16:23:20 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.