material-components / material-components/material-web

md-dialog: scrollbar Flash on opening

Open
#5,121 8 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
11.3k
Forks
1.1k
Avg merge
20h 28m
Merged PRs (30d)
13

Description

### What is affected?

Component

### Description

The scrollbar flashes when the dialog opens even in the case the content is not scrollable.
It's particularly more apparent in dark mode.
See below playground for a demonstration of this issue.

### Reproduction

https://lit.dev/playground/#gist=825f3acbc05233df00a8cdb1bd9693c2

### Workaround

Could this issue be fixed by hidding the overflow on animation start?

### Is this a regression?

No or unsure. This never worked, or I haven't tried before.

### Affected versions

@material/web@1.0.1

### Browser/OS/Node environment

Any browser/system

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Lit playground reproduction and inspect the md-dialog opening behavior for non-scrollable content, including dark mode. Confirm the issue against @material/web@1.0.1 in a browser, then verify that opening the dialog no longer briefly shows a scrollbar.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.