Skip to content

Wrong snackbar width when resizing tab #16911

Closed
@bagage

Description

@bagage

Reproduction

Steps to reproduce:

  1. Open snack-bar example page
  2. 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:

Capture d’écran vidéo de 29-08-2019 14:13:34_cropped

What happened:

  1. When window width is >960px, snackbar should be small (ok)
  2. At 960px, snackbar gets fullscreen (bad)
  3. At 913px, it goes small again
  4. 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

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsmaterial specIssue related to the Material Design spec https://material.io/design/

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions