mat-toolbar display correctly on all (recent) desktop and mobile browsers.
mat-toolbar does not display correctly on Safari, iOS simulator and Android emulator.
Works fine on Chrome and real Android devices (using Chrome webview).

Safari shows the issue here, but the behavior is the same on android/ios simulator webview.
git checkout pwa/materialnpm installnpm start and load the website on safariI tried to reproduce a simpler case on StackBlitz but could not find a productible minimal setup.
I'm also investigating if it's somehow related to the inclusion of @angular/flex-layout
Not really usable as it is :)
@angular/cdk: 5.0.4
@angular/cli: 1.5.5
@angular/flex-layout: 2.0.0-beta.10-4905443
@angular/material: 5.0.4
@angular/service-worker: 1.0.0-beta.16
@angular-devkit/build-optimizer: 0.0.38
@angular-devkit/core: 0.0.25
@angular-devkit/schematics: 0.0.48
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.5
@schematics/angular: 0.1.13
typescript: 2.4.2
webpack: 3.8.1
tested with safari 11.02, nexus 6/android 7 android emulator and ios 11.2 simulator.
Note that the provided repo use an older angular-material rc.2 version, but the issue is the same with the latest current version shown here I took the screenshot with.
The toolbar doesn't show up, because the toolbar is being placed using position: fixed inside of the mat-sidenav-container, which uses z-index: 1 and position: relative.
This seems to be a Safari Bug: https://bugs.webkit.org/show_bug.cgi?id=160953
cc. @mmalerba
@DevVersion the bug also occurs on Android emulator webview, it's not limited to safari.
Might happen there as well. I was just able to confirm it on Safari, and was able to associate it with the mentioned Webkit bug. The bug report mentions some related chrome issues as well.
Since the issue has been categorized as "minor", do you have any suggestion for a workaround?
same issue with:
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@ngx-translate/core": "^9.0.1",
"@angular/cdk": "^5.0.0",
"@angular/material": "^5.0.0",
"@angular/flex-layout": "2.0.0-beta.12",
browser: Google Chrome Version 55.0.2883.87 (64-bit)
os: Arch Linux
Hello, is there a clean solution for Safari?
Hi everyone, does anyone have already found an alternativo solution?
Hi, i am also facing similar issue where the mat tool bar is not fixed on the iOS safari browser. Did anyone got any solution to fix it.
Hi, I found a temporary fix for my project, but I'm not sure that this is correct...
<app-header> to the top of the root <div> of the shell.component.htmlExample:
<div fxFlex>
<app-header></app-header>
<mat-sidenav-container fxFill>
<mat-sidenav></mat-sidenav>
<mat-sidenav-content>
<router-outlet></router-outlet>
</mat-sidenav-content>
</mat-sidenav-container>
</div>
shell.component.scss.mat-drawer-container {
position: unset;
}
@AndrewKochura - that worked for me!
@AndrewKochura Thanks for your workaround! I'm using ngxRocket's shell component and had to also add a media breakpoint to hide the top menu when on small screens.
added to shell.component.scss:
@media ($mat-xsmall) {
.mat-sidenav,
.mat-drawer-content,
:host ::ng-deep .mat-drawer-backdrop {
top: 56px;
}
}
Same problem for my app.
IOS 12.4.2
Angular Material: 8.2.3
Is this issue still open? I am having this issue with safari on Android. The above workaround did not work form me because the toolbar did not stay at the top when scrolling...
An update on what to do about this issue would be great.
@AndrewKochura - this workaround worked for me. thanks!
Most helpful comment
Hi, I found a temporary fix for my project, but I'm not sure that this is correct...
1) Move
<app-header>to the top of the root<div>of theshell.component.htmlExample:
2) Add the following style to the
shell.component.scss