focus changes not working as intended in the staff catalog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
The Angular staff catalog code tries to set the focus to the first relevant form input whenever you navigate to a tab on the search page. However, this does not work consistently:
- when you navigate with an explicit searchTab URL parameter, it works - e.g., /eg2/en-
- when you navigate to the search form via the menu, it doesn't work - no specific focus is set
- when you change from one tab to another in the search form, it doesn't work; the focus stays with the tab selector
Note that for the last point, there's an accessibility question: do we actually want the focus to be moved to the form input in that circumstance?
This bug reflects the TODO around line 178 of Open-ILS/
// TODO: sometime the selector is not available in the DOM
// until even later (even with setTimeouts). Need to fix this.
// Note the error is thrown from selectRootEleme
// call to .focus() on a null reference.
Bug 1951267 is related to this.