Closed yuzhva closed 5 years ago
You can prevent the inline CSS that conflicts with yours by not disabling the scroll: set scrollDisabled: false
: https://github.com/davidtheclark/react-aria-modal#scrolldisabled.
That means you'll be able to scroll what's under the modal. It's a limitation. You could look into using https://github.com/willmcpo/body-scroll-lock to lock the scroll, instead. Maybe it will work better for you. If so, please let me know — we could consider switching this modal library's scroll lock from no-scroll (which locks with CSS) to body-scroll-lock (which I think locks with just JS).
My HTML template looks like:
When the modal is opened, I'm receiving inline style like:
The trick if that CSS top style changes and that breaks my layout...
Depending on how much I scrolled from top of the page - tag top: style is dynamically changing.
How can I avoid of changing inline styled for HTML tag? (at the same time the content under modal should not be available for scrolling)
P.S: an inline style that is bad practice, but it's required in some cases. In the case when a global tag styling witch inline style - that is "ccc-combo" - it's better to avoid of such approach.