1
0
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:
Kyle Spearrin
2018-08-01 09:13:49 -04:00
parent 76c89f01ef
commit a26527b500
2 changed files with 16 additions and 1 deletions

View File

@@ -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();
}
}