alvarotrigo / alvarotrigo/react-fullpage

Changing autoScrolling on non full-screen section behaves unexpectedly

Aperta
#241 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
JavaScript
Stelle
1.3k
Fork
172
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Description

Hi, I am using React Fullpage for render some sections, and one of them should be non-autoscrollable, so I have some bug when the state will be true, the page will faster scrolling to upper section without animation. Is it possible to deactive autoscrolling and FitToSection on one section, and when it will be other page activate autoscroll but without any jerking?

My code:

{
console.log(destination, 'destination')
if (destination.item.classList.contains('fp-responsive-auto-height') || destination.isLast) {
setIsActive(false)
return
} else {
setIsActive(true)
}
}}
render={({ state, fullpageApi }) => {
if (!isActive) {
fullpageApi.setAutoScrolling(false)
} else {
if (state.initialized) {
fullpageApi.setAutoScrolling(true)
}
}
return (


















//*---THIS section is 1200 px height&---*






//*---THIS section is 200 px height&---*


)
}}
/>

//*---after will be also footer section in App components*

### Steps to reproduce it
1. Create full page section
2. Try to make one or two page without autoscrolling and disableFitTosection to avoid any jerking

### Versions
use Chrome, win 10

Thank you in advance!!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.