Summary: | Focus input by default when clicking on a dropdown field in the cataloguing editor | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | Cataloging | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, lucas, m.de.rooy, martin.renvoize, victor |
Version: | unspecified | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
22.11.00, 22.05.07, 21.11.14
|
Circulation function: | |
Attachments: |
Bug 31646: Add Select2 focus to text search field
Bug 31646: Add Select2 focus to text search field Bug 31646: Add Select2 focus to text search field |
Description
Aleisha Amohia
2022-09-28 22:52:09 UTC
*** Bug 31429 has been marked as a duplicate of this bug. *** Do we want all dropdowns with a select2-search__field to move focus to the search input? With the 942$c it makes a lot of sense. But maybe with the fields like 942$n ( Suppress in OPAC ) which is a yes/no we would want the focus to stay on the dropdown options so the user can use the keyup and keydown to select either yes/no. I think yes we do want it to move to the search input. They can still search Y or N to get to those yes/no options. Created attachment 141175 [details] [review] Bug 31646: Add Select2 focus to text search field To test: 1. Edit a biblio record 2. Go to tab 9 to find the item type MARC field 942$c 3. Click on the field to select an item type 4. Notice you have to click again on the search field to begin typing to search for your item type 5. Apply patch/clear browser cache 6. Try steps 2-3 again, the focus should now be on the search text field 7. Try another select2 dropdown on the same page like the 942$n ( Suppress in OPAC ), it should also default to the text search field. 8. Try other places in Koha that feature this kind of select2, like when placing hold. Note: Using $(document).on here instead of $(".select2").on becuase there are several instances where there are more than 1 select2 dropdown on a single page. This allows for the text search field to default each time you click on a different dropdown. Hi Lucas, please don't forget to set Assignee, thx! Created attachment 141293 [details] [review] Bug 31646: Add Select2 focus to text search field To test: 1. Edit a biblio record 2. Go to tab 9 to find the item type MARC field 942$c 3. Click on the field to select an item type 4. Notice you have to click again on the search field to begin typing to search for your item type 5. Apply patch/clear browser cache 6. Try steps 2-3 again, the focus should now be on the search text field 7. Try another select2 dropdown on the same page like the 942$n ( Suppress in OPAC ), it should also default to the text search field. 8. Try other places in Koha that feature this kind of select2, like when placing hold. Note: Using $(document).on here instead of $(".select2").on becuase there are several instances where there are more than 1 select2 dropdown on a single page. This allows for the text search field to default each time you click on a different dropdown. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Created attachment 141492 [details] [review] Bug 31646: Add Select2 focus to text search field To test: 1. Edit a biblio record 2. Go to tab 9 to find the item type MARC field 942$c 3. Click on the field to select an item type 4. Notice you have to click again on the search field to begin typing to search for your item type 5. Apply patch/clear browser cache 6. Try steps 2-3 again, the focus should now be on the search text field 7. Try another select2 dropdown on the same page like the 942$n ( Suppress in OPAC ), it should also default to the text search field. 8. Try other places in Koha that feature this kind of select2, like when placing hold. Note: Using $(document).on here instead of $(".select2").on becuase there are several instances where there are more than 1 select2 dropdown on a single page. This allows for the text search field to default each time you click on a different dropdown. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice improvement, works as described. Passing QA Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for upcoming 22.05.07 release applied to 21.11 for 21.11.14 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. |