material-components-web icon indicating copy to clipboard operation
material-components-web copied to clipboard

fix(menu): Fix open menu animation delay.

Open copybara-service[bot] opened this issue 4 years ago • 1 comments

fix(menu): Fix open menu animation delay.

Re-ordered menu surface open classes to render --open after --animating-open to have more specificity for --open.

Also moved setting position properties before adding --open classes so the reflow does not interrupt CSS animation.

For reference here is the order of style changes.

idle: (#on render)
  opacity: 0;
  transform: scale(1);

--animating-open: (#on click)
  opacity: 0;
  transform: scale(.8);

--open: (#requestAnimationFrame)
  opacity: 1;
  transform: scale(1);

Closes #5682 and Closes #4411

copybara-service[bot] avatar Mar 16 '20 19:03 copybara-service[bot]

can we solve PR?

anlexN avatar Jul 10 '22 04:07 anlexN