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

when autoScrolling is false and fitToSection is false, does the normalScrollElements is ignored? #4605

Open
halukkaramete opened this issue Feb 2, 2024 · 2 comments

Comments

@halukkaramete
Copy link

halukkaramete commented Feb 2, 2024

Description

I love the autoScrolling:false & fitToSection:false ability... but when I do that, the normalScrollElements info goes out the window (unexpectedly). When I remove the "autoScrolling:false", and let fullpage to start snapping into sections again, then the same normalScrollElements ifno starts being honored (as expected). This unfortunately prevents me from using the autoScrolling:false option when I have certain divs on the screen, where I do not want mouse scrolls or swipe actions to effect the fullpage sections. Could you test if that is also so for your testings too pls?

Link to isolated reproduction with no external CSS / JS

[Ideally in jsfiddle.net (https://jsfiddle.net/alvarotrigo/ea17skjr) or codepen.io (https://codepen.io/alvarotrigo/pen/NxyPPp), links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]

Steps to reproduce it

  1. [First step]
  2. [Second step]
  3. [and so on...]

Versions

[Browser, operating system, device, ...]

@alvarotrigo
Copy link
Owner

When using autoScrolling: false the normalScrollElements will behave in the same way any other scrollable element does in any other "normal" website.

Once it reaches the bottom or top of the scrollable element, then the whole page will scroll up / down.

Here's an example of the default behavior of the browser for scrollable elements:
https://jsfiddle.net/trfawsju/

I don't know what's your use case. Do you want to prevent any kind of scroll inside that normalScrollElements item?
If you don't want the user to scroll over that element, you might want to consider using the CSS option pointer-events: none;

@alvarotrigo
Copy link
Owner

alvarotrigo commented Feb 21, 2024

Once it reaches the bottom or top of the scrollable element, then the whole page will scroll up / down.

This can be avoided if you use the style overscroll-behavior: contain; on the overflowing content.

See this demos:
https://codepen.io/guivr/full/xxVpzRM
https://codepen.io/anon/pen/oEMmrm

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

2 participants