alvarotrigo / alvarotrigo/react-fullpage

Changing autoScrolling on non full-screen section behaves unexpectedly

未关闭
#241 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
JavaScript
星标
1.3k
派生
172
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。