alvarotrigo / alvarotrigo/react-fullpage

Changing autoScrolling on non full-screen section behaves unexpectedly

Offen
#241 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
JavaScript
Sterne
1.3k
Forks
172
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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!!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.