kiwicom/orbit

Padding right added to body when modal opened

pierceglennie opened this issue · 4 comments

Great to see the recent updates. However, we've come across a bug with modals when upgrading from version 0.122.0 to 2.13.0.

When a modal is opened, it adds padding-right: 15px to the body element – i.e. the background content gets a small bit of right padding. This happens when using the plain modal component not in a or similar.

We've solved the issue by overriding body with padding-right: 15px !important in global styles but I'm not sure what the underlying cause is.

Hi @pierceglennie

The issue is caused by our lockScrolling feature, which adds that padding-right for the body element. Here is described why. I checked our code and we have it enabled by default, so I guess if I will return that option, it should be ok.

Thanks, that makes sense

I added the flag to defaultTheme object, which is called lockScrollingBarGap, it's set to false by default. So I hope it will fix your issue.

Thanks, that fixes it.