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

172
Visualizações
Scroll to id not working in Fullscreen mode

I have created a script to enable/disable the full screen in web page (React JS). In web page on click button web page scrolls to top. Scroll to top is working fine in normal web page but when full screen is enabled scroll is not working. Also, I used the scrollToElement React JS package for scrolling but this is also not working.

import React from 'react'; import {FullScreen, useFullScreenHandle}

export const A = () => {
 /* Click handler to enable the scroll to root*/
 handleClick = () => {
   window.scrollTo( 0, 0)
}
 return (<FullScreen handle={handle}>
    <button onclick={ () => handleClick() }>Scroll To Top</button>
</FullScreen>)
}
    
In Fullscreen scroll is not working.
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The third-party library used react-full-screen has an implementation where when the FullScreen Component goes to fullscreen it sets the containing div to height: 100% without overflow: auto/scroll.

Thus, the element takes the fullscreen and the content overflows without scroll. So, we need to set the overflow correctly and set the scroll function to the containing div instead of body.

enter image description here

This div is the containing element when fullscreen is activated over it by the package.

Check out the implementation here. Open the preview in a new tab for fullscreen to work properly.

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