title: Cypress does not automatically scroll
body: <p>I've tried to use scrollIntoView(), scrollTo() methods, tried to nullify css settings, but all were in way.
  Current situation: When I run test, it gives me this error:
  (Timed out retrying: cy.type() failed because the center of this element is hidden from view:)
  When test runs, it cannot scroll down so it cannot see the locator it needs. When I scroll manually in the meantime down enough to physically see the element, cypress finds it, gets it and make other methods.</p>
  <p>Desirable situation: The test would run the way it could automatically scroll down to the page to see the element it needs so no manual assistance would be needed.</p>
  <p>I write down the code here, but changed personal data. Should i use here code lines like:</p>
  <pre><code>// document.getElementsByTagName(&quot;html&quot;)[0].style.scrollBehavior = &quot;unset&quot;;
  </code></pre>
  <p>or:</p>
  <pre><code>const disableSmoothScroll = () =&gt; {
    cy.document().then((document) =&gt; {
      const node = document.createElement(&quot;style&quot;);
      node.innerHTML = &quot;html { scroll-behavior: unset !important; }&quot;;
      document.body.appendChild(node);
    });
  };
  </code></pre>
  <p>I tried implementing them both, because i've found them in other similar issues, but they did nothing to me.</p>
  <pre><code>import exampleImport from &quot;../../PageObjects/examples/exampleImportClasses.js&quot;;
  
  describe(&quot;Example Test&quot;, function () {
    it(&quot;Details1&quot;, function () {
      pp.login();
      pp.NPAsubmit();
      cy.get(&quot;#name&quot;, { timeout: 30000 }).type(&quot;Test&quot;);
      cy.get(&quot;#Number&quot;, { timeout: 30000 }).type(&quot;123&quot;);
      cy.get(&quot;#vatNumber&quot;, { timeout: 30000 }).type(&quot;123&quot;);
      pp.Address_default();
    });
  });
  </code></pre>
  <pre><code>class exampleImport {
    login() {
      cy.visit(&quot;https://xxx&quot;);
      cy.get(&quot;#email&quot;, { timeout: 30000 })
        .clear()
        .type(&quot;example@gmail.com&quot;);
      cy.get(&quot;#password&quot;).clear().type(&quot;example&quot;);
      cy.get(&quot;button[type=submit]&quot;).click();
      cy.url().should(&quot;include&quot;, &quot;example&quot;);
    }
    NPAsubmit() {
      cy.get(&quot;:nth-child(3) &gt; .nav-link&quot;, { timeout: 30000 }).click();
      cy.get(&quot;.btn-primary&quot;).click();
    }
    Address_default() {
      cy.get(&quot;#street&quot;).scrollIntoView().should(&quot;be.visible&quot;);
      cy.get(&quot;#street&quot;).type(&quot;Test&quot;);
  
      cy.get(&quot;#city&quot;).scrollIntoView().should(&quot;be.visible&quot;);
      cy.get(&quot;#city&quot;).type(&quot;Test&quot;);
      cy.get(&quot;#country&quot;).select(&quot;Uruguay (UY)&quot;);
    }
  }
  
  export default exampleImport;
  </code></pre>