-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turning backdrop transition off causes backdrop to stick around #1607
Comments
There's no easy and performant way to check if element will have transition. How about something like this, which should support all kinds of transitions: if (backdropToDetach) {
let _hasTransition: boolean = false;
backdropToDetach.addEventListener('transitionstart', () => _hasTransition = true);
backdropToDetach.classList.remove('md-overlay-backdrop-showing');
backdropToDetach.classList.remove(this._state.backdropClass);
backdropToDetach.addEventListener('transitionend', () => _cleanUpBackdrop());
setTimeout(() => { if (!_hasTransition) _cleanUpBackdrop() });
} That timeout might not even be needed, haven't tried it out. Also there's typo in that function name |
I was just thinking that we always remove it after X milliseconds if there's no |
Yes, but you'd need to know what's the duration, which you'd have to parse from different css properties(and I think that some animations are inherited, so you'd potentially have to check all parent nodes as well?). My way should be pretty safe. |
For simplicity I'm okay with always removing it after |
It looks like |
Fixes the dialog's backdrop not being removed if it's transition have been disabled. Fixes angular#1607.
Fixes the dialog's backdrop not being removed if it's transition have been disabled. Fixes angular#1607.
Fixes the dialog's backdrop not being removed if it's transition have been disabled. Fixes angular#1607.
Fixes the dialog's backdrop not being removed if it's transition have been disabled. Fixes angular#1607.
* Removes the unnecessary `sleep` in the menu e2e test. The sleep became unecessary because angular#1607 has been fixed.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
If you remove the backdrop transition (e.g. with a backdropClass), the backdrop is never removed because 'transitionend' doesn't fire. This is a problem because then nothing is clickable in the app.
The text was updated successfully, but these errors were encountered: