Skip to content

MatSpinner making scroll bars bounce #16894

Closed
@paulferaud

Description

@paulferaud

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue
https://stackblitz.com/edit/angular-ohvkwv

Steps to reproduce:

  1. Create a spinner
  2. Place in an element with overflow: auto

Expected Behavior

What behavior were you expecting to see?
See the mat spinner, spinning, inside a div.

Actual Behavior

What behavior did you actually see?
The spinner spins, but the div has scroll bars bouncing around.

Fix (?)

Playing with the CSS, it seems like this can be fixed once and for all (I keep hitting this all the time) if:

  • The spinning animation is moved from the host to the actual svg
  • The host is given the style overflow: hidden

Environment

  • Angular: "8.0.0"
  • CDK/Material: "8.1.4"
  • Browser(s): Version 76.0.3809.100
  • Operating System (e.g. Windows, macOS, Ubuntu): Debian GNU/Linux rodete

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/progress-spinnerhelp wantedThe team would appreciate a PR from the community to address this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions