Skip to content

[sidenav] can't close until opening animation is complete #6376

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

Closed
willshowell opened this issue Aug 9, 2017 · 6 comments · Fixed by #6810
Closed

[sidenav] can't close until opening animation is complete #6376

willshowell opened this issue Aug 9, 2017 · 6 comments · Fixed by #6810
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@willshowell
Copy link
Contributor

Bug, feature request, or proposal:

Regression

Expected

Sidenav can still be closed while animating open

Current

Sidenav must wait until animation is complete to trigger new actions

Reproduction

Working with beta.8: https://plnkr.co/edit/Ucv13OC4Zsl55CXRANK3?p=preview
Failing with latest: https://plnkr.co/edit/pCWLJ2ThQrKgGXI2Q9cn?p=preview

Other

Presumably due to #4959 or #6189

@mmalerba
Copy link
Contributor

@crisbeto seems like this may have been a regression from one of your PRs

@mmalerba mmalerba added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Aug 30, 2017
@crisbeto
Copy link
Member

crisbeto commented Aug 30, 2017

It was an intentional change (there's an internal _isAnimating flag that is checked). I did it primarily to ensure that you always get back the correct animation promise and to guard against cases like #5743 and #4932.

@willshowell
Copy link
Contributor Author

@crisbeto are you aware of any open issues in core for #5743 and #4932? If I understand correctly, the current behavior is necessary until those are sorted out?

Further, could you explain this note?
https://github.com/angular/material2/blob/70bd5fc20e7fe6b1749b334d29e842cb3681609d/src/lib/sidenav/drawer.ts#L252-L254

Is that to say that the promise return value will become obsolete, but is there to match the before-animations behavior?

@crisbeto
Copy link
Member

Yes, the previous approach was passing promises around to coordinate the animation, but I removed all of them in #4959 since they weren't necessary anymore. The ones for toggle, open and close were left in since they were a part of the public API.

@crisbeto
Copy link
Member

crisbeto commented Sep 2, 2017

Got some time to look into this. It seems like #5743 isn't an issue for the sidenav. I'll remove the _isAnimating guards.

@crisbeto crisbeto added the has pr label Sep 2, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 2, 2017
Fixes not being able to toggle a drawer while it is mid-animation.

Fixes angular#6376.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 29, 2017
Fixes not being able to toggle a drawer while it is mid-animation.

Fixes angular#6376.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 30, 2017
Fixes not being able to toggle a drawer while it is mid-animation.

Fixes angular#6376.
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 5, 2017
Fixes not being able to toggle a drawer while it is mid-animation.

Fixes angular#6376.
@kara kara closed this as completed in #6810 Oct 6, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants