Regarding Background Scroll Lock #326
-
Hey, I wanted to lock the background scroll on the position where the scroll is when the overlay menu or navigation menu is opened. And as soon as the navigation menu or overlay is closed, the scroll should be unlocked without changing the scroll position. Please help me implementing it if you can throw some light on this issue, it will be really helpful. Thanks already! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
Please can anyone help, I need it urgently. It will be really appreciated. |
Beta Was this translation helpful? Give feedback.
-
Hey @toxifiedmatrix, I hope you find it useful to reach a solution! basically, I did a custom plugin to "fix" the scroll position, and then I used this plugin to initialize it ( stopPlugin.js
index.js
modal.js
|
Beta Was this translation helpful? Give feedback.
-
Hey @nazarenooviedo thank you for reverting regarding the same issue, ill try implementing as per you solution, thanks alot :) |
Beta Was this translation helpful? Give feedback.
-
@nazarenooviedo Hey mate, |
Beta Was this translation helpful? Give feedback.
-
I am trying to implement a similar feature with my mobile nav menu. Was anyone able to achieve this? |
Beta Was this translation helpful? Give feedback.
-
@nazarenooviedo It works great! Thanks for the plugin. :) |
Beta Was this translation helpful? Give feedback.
-
@rossnorthrup Mate, if you still stuck on here, let me know, as I managed to make it work. |
Beta Was this translation helpful? Give feedback.
Hey @toxifiedmatrix, I hope you find it useful to reach a solution! basically, I did a custom plugin to "fix" the scroll position, and then I used this plugin to initialize it (
Scrollbar.use(StopScrollPlugin)
), and finally, I just use a single if to update the plugin option (scrollBar.updatePluginOptions("modal", { scroll: false })
)stopPlugin.js
index.js