Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading fullPage.js in an iframe forces scroll of parent window #4628

Closed
alvarotrigo opened this issue Jun 20, 2024 · 1 comment
Closed

Loading fullPage.js in an iframe forces scroll of parent window #4628

alvarotrigo opened this issue Jun 20, 2024 · 1 comment

Comments

@alvarotrigo
Copy link
Owner

alvarotrigo commented Jun 20, 2024

Description

When loading fullPage.js inside an iframe, unless the option scrollBar: true is used, fullPage.js forces the parent window to scroll to the loaded iframe.

Link to isolated reproduction with no external CSS / JS

https://codepen.io/alvarotrigo/pen/OJYvRXv

It won't work on Codepen, but you can copy the code and run a separate page to reproduce it.
Make sure both pages run in the same domain. I suspect it only works when the iframe and the parent are both the same domain.

Steps to reproduce it

  1. Copy the content of this codepen in a page in local
  2. Make sure to have a local version of a page using fullPage.js
  3. Replace the src for the iframe with the local fulllPage.js page.
  4. Load the page
  5. It will scroll to the dynamically loaded iframe

Versions

Safari, Firefox, Chrome...
fullPage.js 4.0.21 and probably some other previous versions

@alvarotrigo
Copy link
Owner Author

Fixed in 4.0.23! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant