mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 04:33:38 +00:00
add focus method to link component
This commit is contained in:
@@ -52,7 +52,7 @@ export class LayoutComponent {
|
||||
handleKeydown(ev: KeyboardEvent) {
|
||||
if (isNothingFocused()) {
|
||||
ev.preventDefault();
|
||||
this.skipLink().el.nativeElement.focus();
|
||||
this.skipLink().focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,10 @@ export class LinkComponent {
|
||||
.concat(linkStyles[this.linkType()] ?? []);
|
||||
});
|
||||
|
||||
focus() {
|
||||
this.el.nativeElement.focus();
|
||||
}
|
||||
|
||||
constructor() {
|
||||
if (this.isButton) {
|
||||
ariaDisableElement(this.el.nativeElement, this.disabled);
|
||||
|
||||
Reference in New Issue
Block a user