fix(scroll): disable device autofocus

This commit is contained in:
Manu Mtz.-Almeida
2018-02-20 18:15:02 +01:00
parent 376628f286
commit 137e618ddc

View File

@@ -309,11 +309,12 @@ export class Scroll {
}
private refocus() {
setTimeout(() => {
if (document.activeElement === document.body) {
(this.el.querySelector('.focus-input') as HTMLElement).focus();
}
});
// TODO: renable when desktop testing is done
// setTimeout(() => {
// if (document.activeElement === document.body) {
// (this.el.querySelector('.focus-input') as HTMLElement).focus();
// }
// });
}
hostData() {
@@ -329,8 +330,7 @@ export class Scroll {
// scroll-inner is used to keep custom user padding
<div class='scroll-inner'>
<slot></slot>
</div>,
<input type='button' class='focus-input'/>
</div>
];
}