material-components / material-components/material-web

md-menu flashes while closing

Open
#5,519 4 comments 0 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, Other/unknown

Description

When I close md-menu it starts disappearing animation, then just when it is done, it shows an empty menu for a couple of frames and then it is finally gone.

Especially annoying if the menu is big enough

Reproduction
  1. Go to https://material-web.dev/components/menu/#properties (or any other page with the menu)
  2. Click on any example button to show the menu example
  3. Click outside of the menu
  4. Note the flash (this doesn't always happen, but most often)

It could be visible on this recording: https://share.firefox.dev/3V93LGL
1.490s: menu almost transparent
1.491s (next frame): menu is fully opaque again
1.51s (next frame): menu finally disappeared.

Workaround

Disable animation with quick property

Is this a regression?

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

Affected versions

reproducable on 1.2.0, 1.3.0

Browser/OS/Node environment

Firefox 124.0b8 (64-bit), macOS 14.4 (23E214)

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 by reproducing the issue from the md-menu properties page in Firefox, using the listed steps and observing the closing animation. Compare the behavior with the quick-property workaround; done means closing the menu without the empty-menu flash while retaining the animation.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend, web-dev
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.