Skip to content
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

expansion panel disappears if you click quickly on something triggering a collapse #33

Open
sschick-prognos opened this issue Dec 23, 2016 · 3 comments

Comments

@sschick-prognos
Copy link

sschick-prognos commented Dec 23, 2016

Noticed this in my own code where I'd done something a little goofy to make the panel collapse if it was clicked on when it was open. However, the plunkr that @iamempty put together in a different bug also replicates the problem. I've reduced it a little bit for clarity below. The bug only triggers when clicking quickly on an element that will trigger the panel collapsing with a touchpad (a mouse does not trigger the issue). It looks to me like it is triggered when there is a close and then open event in very quick succession.

http://plnkr.co/edit/lmzkgzQKVNfdGh6uswrx?p=preview

@sschick-prognos
Copy link
Author

sschick-prognos commented Jan 2, 2017

After a little fiddling with my own code, I found that running panel.collapse().then(panel.collapse) successfully masks the problem (with a little bit of an odd flash of the element). It would still be great if this could be addressed more elegantly.

@B-3PO
Copy link
Owner

B-3PO commented Jan 31, 2017

I am not exactly clear on how to reproduce this error, can you give me some more info.

  1. steps to reproduce
  2. browsers you are seeing the issue in
  3. os

@mrs-eload
Copy link

Happened to me too when toggle collapsing/expanding from the header.
Looks like css has difficulties to be updated when quickly expanding and collapsing. Animations are probably overlapping.

@B-3PO
ng-click="$panel.collapse()" on md-expansion-panel-header then massive clicks on panel header.
Sometimes panels disappear, sometimes one or more elements are staying.
@sschick-prognos code is exactly like mine but can't reproduce the bug on plunker though.
Oh and the workaround is working, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants