Skip to content

[dialog] Opening dialog overrides padding on the body element #610

@SiTaggart

Description

@SiTaggart

🐛 Bug report

Current Behavior

When the dialog is open, react-remove-scroll via react-remove-scroll-bar, sets some css properties on the body. One of them is padding-top which is set to 0. We need to not do that for our page layout to not break.

We use a sticky masthead which the underlying content uses a padding top value on the body to not be obscured by the masthead.

When react-remove-scroll-bar removed the top padding, the top of the content is under the masthead and the bottom of the page jumps up.

https://share.getcloudapp.com/JruLNJ1j

Expected behavior

react-remove-scroll-bar does allow you to prevent or override some of these css properties. I should be able to pass dialog some control to prevent this from happening.

Suggested solution(s)

expose some react-remove-scroll-bar props to override the behavior.

Your environment

https://www.twilio.com/console/iot/supersim/network-access-profiles

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedExtra attention is neededType: EnhancementGeneral improvements or suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions