-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Angular UI Bootstrap popover prevents ng-click #456
Comments
@joshdmiller I had a quick look at this one and couldn't figure out what is going on here... Suspect a scoping issue but couldn't pin-point it... |
@pkozlowski-opensource This one slipped past me. It looks at first glance like a scoping issue because the popover creates a new child scope and the plunker uses a primitive, so it would never work anyway. But once I fixed that in the Plunker, I exposed the actual issue: it's a little ordering bug here: https://github.com/angular-ui/bootstrap/blob/master/src/tooltip/tooltip.js#L257. When the mouseover trigger is applied, it's unbinding the previous trigger; since there was no previous trigger, it's unbinding the default, which is a click. So, unbinding the click removes the ngClick action. Oops. I'll push a fix this weekend. |
Any news on this? |
0.4 still has this bug, but you can work around it by placing the popover in a different element than the one you want ng-click on. For example, in my Plunker, move the popover to the enclosing |
And why this issue is closed ? |
@ndk- this issue was closed since the problem reported here was fixed. If you've got a similar problem open a separate issue with a minimal reproduce scenario using http://plnkr.co/ |
http://plnkr.co/edit/Er12MM5fWd59Rs0ocX6q?p=preview I don't see ANY fixes... show me please. |
@ndk- your problem has nothing to do with the fix discussed in this issue. What is going on is that you are bumping into a scoping issue. Tooltips / popovers are creating child scopes so your |
It's not my problem, it's the original problem. All i did: changed versions of ui-bootstrap and angularjs. I still do not understand why this bug is closed, since the original issue requires workaround. |
Simple Plunk illustrating my issue: How can I get ng-click to work when I have a popover on the element?
http://plnkr.co/edit/wI0jqq?p=preview
For example - make the top button (with popover) disappear like the second button.
Thanks,
Mark
The text was updated successfully, but these errors were encountered: