Disable scroll and scroll anchor

Hi there,

I use disable scroll when there is a modal open. Now I want to use the scroll anchor functionality to scroll to the top of the page when applying new filters or paginating through a list. But since I’ve added the scroll anchor functionality, the disable scroll functionality for the modal isn’t working. It’s even scrolling to the top when I’m opening the modal.

What am I doing wrong?

Link: https://preview.webflow.com/preview/eebel?utm_medium=preview_link&utm_source=designer&utm_content=eebel&preview=026498f83c0354ec153cdb97cad4bda2&pageId=64f9bd1246e31c40a020ee9f&workflow=preview

Kind regards,

Rémon

Hey @remonw, it seems you have disabled the CMS Filter script from running as when I tried to filter the list my selection was submitted.

You can initialize it by code with window.fsAttributes.cmsfilter.init(); at any point or replace the defer fs-attributes-preventload='true' setting with the async tag from the original script.

However, the modal seemed to be working for me. Can you tell me more on the browser you are testing this on?

Hi @Support-Luis,

I found the problem. It had nothing to do with the implementation of cms filter or disable scroll. The problem was within the CSS. I gave the modal-wrapper a position of absolute and giving it a fixed position solved the problem.

Thanks for taking a look at the issue!

1 Like

Great to hear! Thanks for sharing the solution to the issue :muscle:

1 Like