You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plnkr : http://plnkr.co/edit/etkptgACMyo2Ty0SUyjX?p=preview
Unfortunately I can't reproduce this behaviour.. but I have an idea:
the problem is with this element:
md-sidenav-container > div.mat-drawer-content
here:
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 md-sidenav? Since you can't replicate in a fresh plunker, it sounds like you may have some overriding css somewhere else.
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.
@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.
Activity
willshowell commentedon Sep 9, 2017
Can you reproduce in a plunker?
mohitook commentedon Sep 9, 2017
Plnkr :

http://plnkr.co/edit/etkptgACMyo2Ty0SUyjX?p=preview
Unfortunately I can't reproduce this behaviour.. but I have an idea:
the problem is with this element:
md-sidenav-container > div.mat-drawer-content
here:
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..
willshowell commentedon Sep 10, 2017
This happens consistently? Can you show the styles and computed styles of the
md-sidenav? Since you can't replicate in a fresh plunker, it sounds like you may have some overriding css somewhere else.sina-masoud-ansari commentedon Sep 11, 2017
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:
mohitook commentedon Sep 11, 2017
so the problem is real. I won't use scss until I have no other option, but thanks for the workaround!
dereekb commentedon Sep 12, 2017
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.
josephperrott commentedon Sep 27, 2017
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.
dereekb commentedon Sep 27, 2017
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.
functionportal commentedon Oct 6, 2017
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.
karan-kang commentedon Oct 20, 2017
This issue is reproducible for me.
afarbman commentedon Jan 10, 2018
having the same issue
mmalerba commentedon Jan 17, 2018
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
mmalerba commentedon Jan 27, 2018
Those of you experiencing issues, have you tried the
autosizeoption? does it help?tpeyrard commentedon Feb 5, 2018
@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.
mmalerba commentedon Feb 5, 2018
@tpeyrard can you provide a stackblitz repro? here's our template: https://stackblitz.com/edit/angular-material2-issue
ishan123456789 commentedon Feb 13, 2018
Removing all the animations helped me fix the issue.Hope this helps someone.
mmalerba commentedon Feb 16, 2018
I'm assuming this is the same issue as #9837, check out the plunker I posted on that issue for a workaround
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.