1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 13:40:06 +00:00

fixing the auto focus issue with search

This commit is contained in:
cd-bitwarden
2025-04-18 16:55:25 -04:00
parent c798e1f10d
commit 883ed2fb80
5 changed files with 32 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ export * from "./drawer";
export * from "./form-field";
export * from "./icon-button";
export * from "./icon";
export * from "./search/search.component";
export * from "./input";
export * from "./item";
export * from "./layout";

View File

@@ -39,6 +39,10 @@ export class SearchComponent implements ControlValueAccessor, FocusableElement {
@ViewChild("input") private input: ElementRef<HTMLInputElement>;
focus(): void {
this.getFocusTarget()?.focus();
}
protected id = `search-id-${nextId++}`;
protected searchText: string;
// Use `type="text"` for Safari to improve rendering performance