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.
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?
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.