mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 13:08:16 -06:00
Fixes #7839 Focus on searchbar
This commit is contained in:
parent
6807db4967
commit
edd03e785c
BIN
netbox/project-static/dist/netbox.js
vendored
BIN
netbox/project-static/dist/netbox.js
vendored
Binary file not shown.
BIN
netbox/project-static/dist/netbox.js.map
vendored
BIN
netbox/project-static/dist/netbox.js.map
vendored
Binary file not shown.
@ -38,8 +38,8 @@ function initDocument(): void {
|
|||||||
|
|
||||||
function initWindow(): void {
|
function initWindow(): void {
|
||||||
const contentContainer = document.querySelector<HTMLElement>('.content-container');
|
const contentContainer = document.querySelector<HTMLElement>('.content-container');
|
||||||
if (contentContainer !== null) {
|
if (contentContainer !== null && document.activeElement !==null && document.activeElement.tagName.toUpperCase() !== 'INPUT') {
|
||||||
// Focus the content container for accessible navigation.
|
// Focus the content container for accessible navigation, unless an input item has focus
|
||||||
contentContainer.focus();
|
contentContainer.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user