question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Modal] .mui-fixed issue with border-box

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Elements with postition: fixed;, right: 123px and .mui-fixed class applied doesn’t move on Modal open

Current Behavior

it moves, because additional padding doesn’t affect element with right position

Steps to Reproduce (for bugs)

Reproducer: Edit 31r260r6mm

Context

Your Environment

Tech Version
Material-UI 1.0.0-beta.21
React 16.0.0
browser Firefox-57, Chrome-62
etc

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Jul 11, 2019

This is interesting, your example doesn’t work:

        <Button
          className="mui-fixed"
          style={{
            position: "fixed",
            right: "10px",
            backgroundColor: "pink"
          }}
          onTouchTap={this.openPopoverAvatar}
          aria-owns="simple-menu"
          aria-controls="simple-menu"
          aria-haspopup="true"
        >
          show popover
        </Button>

But this variation does. It’s the solution I would encourage to use:

        <div
          className="mui-fixed"
          style={{
            position: "fixed",
            right: "10px"
          }}
        >
          <Button
            style={{
              backgroundColor: "pink"
            }}
            onClick={this.openPopoverAvatar}
            aria-owns="simple-menu"
            aria-controls="simple-menu"
            aria-haspopup="true"
          >
            show popover
          </Button>
        </div>
0reactions
oliviertassinaricommented, Oct 31, 2019

I have updated the reproduction to use Material-UI v4.5.2: https://codesandbox.io/s/priceless-satoshi-5g8rv. The problem was solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Modal] .mui-fixed issue with border-box #9275 - GitHub
I have searched the issues of this repository and believe that this is not a duplicate. Expected Behavior Elements with postition: fixed;, ...
Read more >
Remove border from MUI Modal - reactjs - Stack Overflow
That will fix your problem. ... The Modal container itself doesn't have a border by default, in case you copy the code from...
Read more >
React Modal component - Material UI - MUI
The modal component provides a solid foundation for creating dialogs, popovers, lightboxes, or whatever else. The component renders its children node in front ......
Read more >
Borders - MUI System
Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.
Read more >
React Box - Material UI - MUI
Overriding MUI components​​ As an example, you may want to change the border of the Button. The Button component defines its own styles....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found