mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
feat(android): make add task bar focus opening keyboard work more reliably
This commit is contained in:
parent
601dfd1276
commit
6996b5abd4
1 changed files with 8 additions and 4 deletions
|
|
@ -162,11 +162,15 @@ export class AddTaskBarComponent implements AfterViewInit, OnDestroy {
|
|||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
this._autofocusTimeout = window.setTimeout(() => {
|
||||
if (!this.isDisableAutoFocus) {
|
||||
// for android we need to make sure that a focus event is called to open the keyboard
|
||||
if (!this.isDisableAutoFocus) {
|
||||
document.body.focus();
|
||||
(this.inputEl as ElementRef).nativeElement.focus();
|
||||
this._autofocusTimeout = window.setTimeout(() => {
|
||||
document.body.focus();
|
||||
(this.inputEl as ElementRef).nativeElement.focus();
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
this._attachKeyDownHandlerTimeout = window.setTimeout(() => {
|
||||
(this.inputEl as ElementRef).nativeElement.addEventListener(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue