Skip to content

Fixed Sidenav is clipped by mat-sidenav-container in Safari #11715

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

Closed
lucferbux opened this issue Jun 8, 2018 · 19 comments
Closed

Fixed Sidenav is clipped by mat-sidenav-container in Safari #11715

lucferbux opened this issue Jun 8, 2018 · 19 comments
Assignees
Labels
area: material/sidenav G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround

Comments

@lucferbux
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

mat-sidenav element to display fixed in Safari, this sidenav is the one generated with Angular CLI.
ng generate @angular/material:material-nav --name=my-nav-example

What is the current behavior?

Works fine in Google Chrome, but it's hidden in Safari 11.1. (See snapshots below)

What are the steps to reproduce?

In a new project generate the sidnav.
ng generate @angular/material:material-nav --name=my-nav-example
Place it in app.component.html.

I have build the project into production and the issue still persists.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"@angular/material": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.2.tgz",
"integrity": "sha512-928g7cnnRIJJx9/pC5GWqypcxrKkfijTCrCC6yeypvcgab1pmsk7m+1uE8VSFGIsUb6x8W3CF5nJUT1viuBIZg==",
"requires": {
"tslib": "^1.7.1"
}

Google Chrome

screen shot 2018-06-08 at 14 54 48

Safari

screen shot 2018-06-08 at 14 54 55

@lucferbux
Copy link
Author

I have check that the issue is opened in #11392
But I don't see a real fix in the suggested ones, I will leave the issue open for more info.

@amcdnl
Copy link
Contributor

amcdnl commented Jun 15, 2018

Fixed by - https://github.com/angular/material2/pull/11191/files#diff-98cc0250d23a2ee2df9c0b956a89c124R84

@amcdnl amcdnl closed this as completed Jun 15, 2018
@ssgriffen
Copy link

Hey @amcdnl Is the fix in prod? I've upgraded to 6.3.0 and am still having this issue?

@lucferbux
Copy link
Author

Same here @amcdnl I've upgraded my project to 6.3.0 and it's still broken. The fix is in that version?

@amcdnl
Copy link
Contributor

amcdnl commented Jul 15, 2018

You will need to re-generate the schematic.

@visyan
Copy link

visyan commented Jul 25, 2018

Hi, facing this issue as well even after update to @angular/material 6.4.1. What do you mean by 're-generate the schematic' ?

@Mischazz
Copy link

Mischazz commented Jul 30, 2018

mat-drawer-container{ overflow: visible; }
I added this as temporary fix. That worked for me

@ghost
Copy link

ghost commented Sep 22, 2018

@Mischazz thanks a lot for that! I think it has to be
.mat-drawer-container{ overflow: visible; }
though, just for anyone wondering in the future.

@olefrank
Copy link

This doesn't seem to be fixed yet (7.0.0-beta.23) ??

@offroadkev
Copy link

mat-drawer-container { overflow: visible; } did not solve the issue for me. I'm running 7.2.0

@kesavik
Copy link

kesavik commented Apr 29, 2019

@vegaskev try .mat-drawer-container{ overflow: visible; }. It worked for me.

@GeoffMahugu
Copy link

@Mischazz Having the same issue and .mat-drawer-container{ overflow: visible; } didn't work for me
I'm currently in "@angular/material": "^7.3.6"

@jelbourn jelbourn reopened this May 13, 2019
@jelbourn jelbourn added G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround labels May 13, 2019
@dheeraj-kawatra
Copy link

.mat-drawer-container{
position: fixed;
overflow: visible;
height: 75px;

.mat-drawer-backdrop {
    height: 100vh;
}

}

This met my requirements. tweak for your own.

@jelbourn jelbourn changed the title Angular 6 SideNav Not Working in Safari (neither Google Chrome on iOS) SideNav Not Working in Safari (neither Google Chrome on iOS) Sep 9, 2019
@Brhav
Copy link

Brhav commented Sep 13, 2019

If somebody is looking into this, it may be interesting to also look at #16491 which seems to be closely related

@jelbourn
Copy link
Member

jelbourn commented May 27, 2020

This is caused by a WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=160953

mat-sidenav-container is overflow: hidden and has a z-index. This triggers the bug in Safari that incorrectly causes the position: fixed mat-sidenav element to be clipped by the containing mat-sidenav-container.

Since the WebKit bug has been open since 2016, we should probably work around this on our end.

The StackBlitz from #16491 is a good reproduction.

@jelbourn jelbourn changed the title SideNav Not Working in Safari (neither Google Chrome on iOS) Fixed Sidenav is clipped by mat-sidenav-container in Safari May 27, 2020
@aleperfetti81
Copy link

Hi Guys,

is this problem fixed? I've tried with @vegaskev solution but it didn't worked. can you help me?
I face the problem only on safari and chrome on IOS.

Thank you very much for your help!

@lukekroon
Copy link

I have the same problem on Angular Material 10.2. The mentioned suggestions does not work for me. Any other workarounds?

@aleperfetti81
Copy link

Hi guys, any solution?

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/sidenav G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

No branches or pull requests