Open cleon26 opened 7 years ago
The problem manifests if at least two dropdowns are in the same container - in this case, both are using append-to-body
, so they have the same parent element.
This would require us to use a multimap to fix this, as we would need to verify that there are no elements in the particular container before trying to remove the class.
@cleon26 did you devise a workaround for this issue? I'm experiencing the same problem
Sadly no.
@cleon26 I just ended up using ng-click on the same element
As a workaround, you can bind is-open
to property with getter and setter and perform required action in setter instead of on-toggle
Thanks for the workaround @levenleven, that works perfectly!
When I have two dropdowns on the same page, both of which are using the on-toggle event, only one of them is called when i use the other dropdown to close the first.
In this plunker, open up your console and try this:
1, click dropdown1 to open it. you'll see an event logged "dropdown1 open"
http://plnkr.co/edit/SuaxVHxf84QG8KFFbvhY?p=preview