md-sidenav align="end" in child component causes horizontal scrolling
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
md-sidenav in child component shouldn’t behave differently to md-sidenav in component with no child
What is the current behavior?
if you move md-sidenav
with align="end"
to a child component to the one housing md-sidenav-layout
, horizontal scrolling is introduced when sidenav is closed.
What are the steps to reproduce?
THE FOLLOWING WORKS PERFECTLY:
<md-sidenav-layout fullscreen>
<md-sidenav opened="true" align="end" #right style="width: 200px;">
<button md-raised-buttton (click)="right.close()">CLOSE</button>
</md-sidenav>
</md-sidenav-layout>
To check:
- Click close button
- Attempt to drag window horizontall. Nothing happens
NOW, WITH SIDENAV IN CHILD COMPONENT:
PARENT.HTML
<md-sidenav-layout fullscreen>
<app-child></app-child>
</md-sidenav-layout>
CHILD.HTML
<md-sidenav opened="true" align="end" #right style="width: 200px;">
<button md-raised-buttton (click)="right.close()">CLOSE</button>
</md-sidenav>
To simulate, repeat step above. Note that screen scrolls horizintally but the width of the md-sidenav
.
What is the use-case or motivation for changing an existing behavior?
i utilize multiple sidebar and want to encapsulate them as standalone components
Which versions of Angular, Material, OS, browsers are affected?
angular 2.2.3 material: alpha 11 os: osx 10.12.1 browser: chrome 55.0.2883.75 (64-bit) (but i get the same issue on any browser i’ve tried)
Is there anything else we should know?
nope, thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
md-sidenav align="end" in child component causes horizontal ...
if you move md-sidenav with align="end" to a child component to the one housing md-sidenav-layout , horizontal scrolling is introduced when ...
Read more >Angular 6 - Material sidenav horizontal scroll - Stack Overflow
Just trying to enable horizontal scrolling inside of mat-side-nav... Update: Attempted using "white-space: nowrap" to the styling. Only affected ...
Read more >Well-controlled scrolling with CSS Scroll Snap - web.dev
Here scroll snapping ensures at the end of scrolling an image horizontal center is aligned with the horizontal center of the scroll ...
Read more >Horizontal scrolling - Webflow University
Horizontal scrolling fully engages visitors by using a unique interaction that changes their scrolling experience from vertical to right to left.
Read more >How to find the cause of horizontal scrollbars - Polypane
To find out which elements cause a horizontal scrollbar, you can use the devtools to delete elements one by one until the scrollbar...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same problem, got solved by giving the md-sidenav a
position: fixed
.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.