mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 14:04:03 +00:00
fixing the auto focus issue with search
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user