Преглед на файлове

Fix an issue where .focus() is scrolling the page, same as in UrlUI

Artur Paikin преди 6 години
родител
ревизия
363eb46cec
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/views/ProviderView/AuthView.js

+ 3 - 1
src/views/ProviderView/AuthView.js

@@ -3,7 +3,9 @@ const { h, Component } = require('preact')
 
 class AuthBlock extends Component {
   componentDidMount () {
-    this.connectButton.focus()
+    setTimeout(() => {
+      this.connectButton.focus({ preventScroll: true })
+    }, 150)
   }
 
   render () {