alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.29k stars 178 forks source link

Not ending up on the first section after Next.js page transition #327

Open gustavlrsn opened 2 years ago

gustavlrsn commented 2 years ago

Description

Hello! I recently upgraded to v4 when I noticed this issue, the bug is not in v3.

I have multiple pages in Next.js with different fullpage sections, when doing a page transition I'm not always ending up on the first section.

https://user-images.githubusercontent.com/1552194/168397655-5cb7a63b-3103-4372-8e43-aaced4cd0651.mov

Reproduction

https://codesandbox.io/s/react-fullpage-page-transition-bug-5qre5d?file=/components/fullpage.js (might need to open a new terminal and run yarn start and open a new browser in :3001, seems to be some issue with CodeSandbox)

Steps to reproduce it

  1. Click down the sections until you get to the last section
  2. Click link to the second page
  3. See that you end up on section number 2 and not the first one

Versions

Chrome, Mac OS

alvarotrigo commented 2 years ago

Thanks for reporting it! I'll investigate it.

dev-lukian commented 2 years ago

Was this ever fixed? I am still having issues.

alvarotrigo commented 2 years ago

Not yet.

dev-lukian commented 2 years ago

@alvarotrigo Are there plans of fixing this soon? I am about to launch a project and this is a bug that is refraining me from doing so.

alvarotrigo commented 2 years ago

No plan. I might need external help to figure this out, as I'm not heavy on React or Next :)

skoteskote commented 2 years ago

Hi, any estimate on when it will be resolved? This issue is currently blocking us from upgrading to v4, which we really would like to do as it's much smoother.

alvarotrigo commented 2 years ago

@skoteskote I've just tested it again and I can not reproduce the issue anymore here: https://codesandbox.io/s/react-fullpage-page-transition-bug-5qre5d?file=/components/fullpage.js

Can you verify you still have the issue?

It might have been solved when updating the React wrapper to the latest fullPagejs version?

dev-lukian commented 2 years ago

I fixed this issue by adding fullpage_api.silentMoveTo(1) right after I switch to another page.

devAdrish commented 1 year ago

Issue still exists. I was trying to do it withfullpage_api.moveTo(1) but was facing #405. @dev-lukian thanks for this.

Point to be noted that it works fine if ReactFullpage is only the thing being rendered on the screen. However, I also have a Header (position: fixed, zIndex: 10000), which breaks this. which shouldn't happen.