Closed
Description
Reproduction
Steps to reproduce:
- Open snack-bar example page
- Set timeout to 500 and show a toast
Expected Behavior
What behavior were you expecting to see?
Sidebar should be centered/small on big resolution (>960px), and fullwidth on small screens.
Actual Behavior
What behavior did you actually see?
I've done a video:
What happened:
- When window width is >960px, snackbar should be small (ok)
- At 960px, snackbar gets fullscreen (bad)
- At 913px, it goes small again
- At 600px it goes fullscreen again.
I believe this is because orientation is changing from landscape to portrait during the resize (I had an height of 912px), and the code that handles it relies on that but the behavior is somewhat strange.
Environment
- Angular: https://material.angular.io/components/snack-bar/examples
- CDK/Material: 8.1.4
- Browser(s): Chrome and firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu