Skip to content

Commit b9dd654

Browse files
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
2 parents 5739757 + b0df24e commit b9dd654

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

netbox/project-static/dist/netbox.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/dist/netbox.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/src/select/api/apiSelect.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,12 @@ export class APISelect {
411411
} finally {
412412
this.setOptionStyles();
413413
this.enable();
414-
this.slim.slim.search.input.focus();
414+
415+
// Set the focus to the search field if the select is open
416+
if (this.slim.slim.content.classList.contains("ss-open")) {
417+
this.slim.slim.search.input.focus();
418+
}
419+
415420
this.base.dispatchEvent(this.loadEvent);
416421
}
417422
}

0 commit comments

Comments
 (0)