1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge pull request #9735 from kkthxbye-code/fix-9734

Fixes #9734 & #9713 - Only set focus on select field search boxes if the select is open
This commit is contained in:
Jeremy Stretch
2022-07-15 08:14:46 -04:00
committed by GitHub
3 changed files with 8 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -411,7 +411,12 @@ export class APISelect {
} finally {
this.setOptionStyles();
this.enable();
this.slim.slim.search.input.focus();
// Set the focus to the search field if the select is open
if (this.slim.slim.content.classList.contains("ss-open")) {
this.slim.slim.search.input.focus();
}
this.base.dispatchEvent(this.loadEvent);
}
}