mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
is mobile browser checks on autofocus
This commit is contained in:
@@ -4,6 +4,8 @@ import {
|
||||
Input,
|
||||
} from '@angular/core';
|
||||
|
||||
import { Utils } from '../../misc/utils';
|
||||
|
||||
@Directive({
|
||||
selector: '[appAutofocus]',
|
||||
})
|
||||
@@ -17,7 +19,7 @@ export class AutofocusDirective {
|
||||
constructor(private el: ElementRef) { }
|
||||
|
||||
ngOnInit() {
|
||||
if (this.autofocus) {
|
||||
if (!Utils.isMobileBrowser && this.autofocus) {
|
||||
this.el.nativeElement.focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user