-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
md-sidenav-container > div.mat-drawer-content unwanted margin #6958
Comments
Can you reproduce in a plunker? |
Plnkr : The margin-left is the property what is wrong. The interesting thing is that is is a counted value based on the sidenav's width. I don't know why but it adds + a few pixel to it what makes this issue.. |
This happens consistently? Can you show the styles and computed styles of the |
I'm having the same issue, sidenav-width 250px, margin-left on Safari 399px. Just fyi, a current work around in our project where the sidenav auto collapses for smaller screens:
|
so the problem is real. I won't use scss until I have no other option, but thanks for the workaround! |
I've had this issue on macOS Safari only, and haven't seen it appear in Chrome. Happens somewhat consistently, but not always. The sidenav is also responsive, and it only recently started happening. Might be somewhat related to #6743. |
It looks like the logic controlling this was updated in #6712 If you are still seeing this issue please provide a reproduction plunker/stackblitz for us to investigate. |
I’ll try and reproduce it when I get a chance, but it only occurred in Safari. I’ll try it on both Sierra and High Sierra. |
In the release 2.0.0-beta.12 the right margin is randomly miscalculated for mat-sidenav-content when sidenav in in side mode. If the sidenav mode is dynamically switched between over and side, the problem randomly resolves itself. There must be some kind of timing issue in calculating the mat-sidenav-content right margin. |
This issue is reproducible for me. |
having the same issue |
This sounds like it might be related to #5698 which I filed a chrome bug for: https://bugs.chromium.org/p/chromium/issues/detail?id=787628 |
Those of you experiencing issues, have you tried the |
@mmalerba it's worse because it makes the problem appear 100% of time. If I open the sidenav, it adds 215px margin-left, that I don't want. However, if I load another component while the sidenav is open, the 215px are correctly applied (they're applied from the left of the screen, not from the right of the sidenav. Tried on Firefox 58. |
@tpeyrard can you provide a stackblitz repro? here's our template: https://stackblitz.com/edit/angular-material2-issue |
Removing all the animations helped me fix the issue.Hope this helps someone. |
I'm assuming this is the same issue as #9837, check out the plunker I posted on that issue for a workaround |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
bug
What is the expected behavior?
There should be no unnecessary margin between the sidenav and the normal content.
What is the current behavior?
What are the steps to reproduce?
`
<md-menu x-position="before" #menu="mdMenu">
menuProducts
Dashboard
`
Please ignore the unnecessary codes.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
newest
Is there anything else we should know?
After I resize the window and the sidenav goes to mobile mode, and back -> the unwanted margin is gone...
The text was updated successfully, but these errors were encountered: