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

Dropdowns close when anything vaguely bound to it updates #301

Open
BenWoodford opened this issue Mar 16, 2016 · 2 comments
Open

Dropdowns close when anything vaguely bound to it updates #301

BenWoodford opened this issue Mar 16, 2016 · 2 comments

Comments

@BenWoodford
Copy link

EDIT: Wasn't the line I thought it was, but something is very off.

Whenever anything in my app updates that has some distant binding to the dropdown, the dropdown closes without firing closeMenu.

It seems that the link function on the directive is called every time something happens within any sort of scope with it, because of how bindings work... and this is calling the following line:

if(dropdown) {
    dropdown.css('display', 'none');
}
@BenWoodford BenWoodford changed the title Dropdowns close when anything updates Dropdowns close when anything vaguely bound to it updates Mar 16, 2016
@jbrowning
Copy link
Member

Thanks for reporting! Can you please create a plunk or jsfiddle demonstrating your issue?

@BenWoodford
Copy link
Author

Bear with me, I'm actually not entirely sure what it was causing the link to be called whenever something updated. Trying to repeat it in Plunker without much luck... From what I've read link is called every time the scope changes, which means the dropdown closes itself when something in scope changes... just not sure how to replicate that right now.

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

2 participants