1
0
mirror of https://github.com/bitwarden/web synced 2025-12-14 07:13:23 +00:00

is mobile browser checks on autofocus

This commit is contained in:
Kyle Spearrin
2018-08-01 09:13:55 -04:00
parent f830de8d13
commit 2ab2f757a0
3 changed files with 6 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ import {
} from '@angular/core';
import { ModalComponent as BaseModalComponent } from 'jslib/angular/components/modal.component';
import { Utils } from 'jslib/misc/utils';
@Component({
selector: 'app-modal',
@@ -39,7 +40,9 @@ export class ModalComponent extends BaseModalComponent {
});
this.el.on('shown.bs.modal', () => {
this.onShown.emit();
this.el.find('*[appAutoFocus]').focus();
if (!Utils.isMobileBrowser) {
this.el.find('*[appAutoFocus]').focus();
}
});
this.el.on('hide.bs.modal', () => {
this.onClose.emit();