ghosh / Micromodal

⭕ Tiny javascript library for creating accessible modal dialogs
https://micromodal.now.sh/
MIT License
3.54k stars 230 forks source link

Body still scrolls when disableScroll: true #58

Closed nadeemja closed 6 years ago

nadeemja commented 6 years ago

Hi,

I'm doing this:

MicroModal.init({disableScroll: true});

But, the body is still scrolling.

How to debug?

ghosh commented 6 years ago

@nadeemja Can you confirm if the body has the following inline styles:-

style="overflow: initial; height: initial;"

screen shot 2017-12-11 at 11 44 16 am

nadeemja commented 6 years ago

Hi!

Thanks for replying so quickly.

There were no such inline styles. I couldn't find anything in the docs about this?

In any case, it works when I add this to the stylesheet:

body {
  overflow: initial; 
  height: initial;
}

Thank you so much for helping! I really love your work :)

ghosh commented 6 years ago

Hmm..that's strange. Are you including the library directly from the CDN? Otherwise if installed via npm could you please confirm if the version is > 0.2.0?

nadeemja commented 6 years ago

Hi,

I'm running 0.2.1. Should I downgrade?

ghosh commented 6 years ago

No it should work fine. A few more questions.

nadeemja commented 6 years ago

Hi,

I'm using it with Meteor via NPM.

If I recall correctly, Meteor does some interesting things when deciding what should go into the body-tag. Might be the culprit.

I'm using Chrome Version 62.0.3202.94 (Official Build) (64-bit).

Not sure how to answer your last two questions, as I'm just getting started using MicroModal.

ghosh commented 6 years ago

@nadeemja I can't reproduce this issue. Are you still having this problem?

nadeemja commented 6 years ago

No :)

ghosh commented 6 years ago

Great to hear that.