Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

89
Visualizações
Material Lite Automatically Scrolls to the Top of the Page after Page Load

I have a website where huge amounts of data can be retrieved from a MySQL database. It has the Material Lite as the core design. The problem is, when I open a page and scroll down, the page goes to the top as soon as it finishes loading, which is frustrating for readers.

I've checked all my scripts, and I even removed them all, keeping Material Lite, yet the outcome is the same.

Even on their own website, they have this issue (https://getmdl.io/components/index.html). You can try it, but try to be quick scrolling down before the page loads.

One thing I noticed is when I remove the class "mdl-js-layout" from the main "mdl-layout" div, the problem disappears.

Here's the tag before removing the class aforementioned:

<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--no-desktop-drawer-button"> page content goes here.... </div>

I've taken it from the Material Lite guide.

And here's the Material Lite script I'm using:

<script name="material_script" defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>

Any ideas on how to keep this class yet get rid of the problem? (Not sure if I have to keep it, but this is how the div is built according to the ML website).

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda