lucaspulliese / vue-cool-lightbox

Vue.js lightbox inspired by fancybox.
https://vue-cool-lightbox.lucaspulliese.com
341 stars 54 forks source link

feat: add a prop to enable/disable page scroll #57

Closed therealpecus closed 3 years ago

therealpecus commented 3 years ago

Disabling scrolling on the underlying page makes sense and Vue Cool Lightbox takes care of fixing the body while preserving the page position. In some situations this might be undesirable (such as in case of conflicts on inline styles on the body element or when a component or animation framework overrides page positioning).

In these case, a new prop enableScrollLock (which defaults to true to guarantee backward compatibility) provides a way, when set to false, to avoid Vue Cool Lightbox setting CSS styles on the body element that prevent page scroll.

lucaspulliese commented 3 years ago

You are the best, thanks for the PR, I will update it to npm and notify you

lucaspulliese commented 3 years ago

Hi @therealpecus, I updated the component with your changes and in the version 2.5.2 you can use the prop enableScrollLock.

So thanks you again and I'm going to add you to the acknowledgements section.

therealpecus commented 3 years ago

Thank you @lucaspulliese ! I had missed your feedback, kudos again for a very well crafted component!

lucaspulliese commented 3 years ago

No problem, thank you very much for the PR!