question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: cdk-overlay-dark-backdrop is removed before overlay is able to transition out

See original GitHub issue

Bug, feature request, or proposal:

I’m considering this a bug since the default behavior in MdDialog is broken. Currently the overlay detaches once the transition caused by removing cdk-overlay-backdrop-showing has ended. However, the cdk-overlay-dark-backdrop class added by default is also removed before the transition occurs.

What is the expected behavior?

The overlay should smoothly transition the backdrop out.

What is the current behavior?

Notice how there’s no fade out in the demo: https://material.angular.io/components/dialog/overview

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Latest

Is there anything else we should know?

I’m assuming the removal of custom classes early is intentional so that custom transitions can be defined on the backdrop. The easiest change that is mostly non breaking is to change .cdk-overlay-backdrop to have transition-props: all. However that isn’t completely accurate and isn’t configurable.

My preference is that the backdropClass specified in the overlay config are always applied up until the dialog is detached, and while the dialog is shown, ${this._state.backdropClass}-showing is toggled on. This allows for full customization of the backdrop before and after the transition.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
crisbetocommented, Aug 12, 2018
0reactions
angular-automatic-lock-bot[bot]commented, Dec 13, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular material 7 cdkoverlay set transparent/custom ...
I am using the cdkoverlay which seems to have a default dark backdrop. Looking at the docs Overlay Documentation , I should be...
Read more >
Overlay | Angular Material
Gets an observable of pointer events targeted outside this overlay. Remove a CSS class or an array of classes from the overlay pane....
Read more >
angular/material/_theming.scss - UNPKG
// The overlay-container is an invisible element which contains all individual overlays. 33 .cdk-overlay-container {. 34 ...
Read more >
A loader for your components with Angular CDK Overlay
I've created a createWithDefaultConfig method including a default configuration ( hasBackdrop and positionStrategy are already defined but it's up to you to ...
Read more >
Angular Material Theming System - Complete Guide
Create a custom theme; Using a pre-built theme; Modify typography; Create a dark theme; Apply Angular Material's theme to custom component; Customizing Angular ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found