Url: fix input focus

This commit is contained in:
Artur Paikin 2018-06-13 11:03:48 -04:00
parent 385fca82c9
commit 3f9aa3bb7f

View file

@ -13,7 +13,7 @@ class UrlUI extends Component {
// Component is mounted right away, but the tab panel might be animating
// still, so input element is positioned outside viewport. This fixes it.
setTimeout(() => {
if (!this.connectButton) return
if (!this.input) return
this.input.focus({ preventScroll: true })
}, 150)
}