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

250
Visualizações
The page automatically scrolls/moves after selecting an option from dropdown

I'm coding in rails and using Stimulus to connect views and javascript. For handling dropdowns, I'm using choices.js, which is an old library and not well supported atm. The issue that I currently have is, when I select an option from dropdowns, while part of dropdown is out of screen, the option is got selected and the page automatically scrolls down. It seems to me, when the half of the options goes off from the bottom of the screen and I'm selecting the top option the browser scrolls down to show/fit the whole dropdown for the next time! To be more clear, after scrolling if I click on dropdown again, the whole list is visible then. This automatic scrolling is not preferable for me. I tried to add scrolling back on choice event but it didn't work. I'm wondering if there is any css or javascript solution for it or not.

before selecting the option

after selecting the option the screen scrolls down and when I click on dropdown the whole dropdown's options can be seen

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I would advise you to go with alpine.js

This way you can use all basic ( even somewhat advanced ) interactions without too much code.

In combination with Tailwind CSS2 you will have a good combo.

about 4 years ago · Juan Pablo Isaza Relatório
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