Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Event is triggered when clicking on child with [ng-inline-svg] #31

Open
skulptur opened this issue Feb 19, 2018 · 2 comments
Open

Event is triggered when clicking on child with [ng-inline-svg] #31

skulptur opened this issue Feb 19, 2018 · 2 comments

Comments

@skulptur
Copy link

skulptur commented Feb 19, 2018

I have a div that acts as a button and inside there's an icon that is its own component. Internally the icon uses your ng-inline-svg directive and if I click anywhere on the button it works (doesn't trigger) but if I click on the icon it triggers ng-click-outside. I tried removing the svg directive and placing some text and it works fine that way, the problem occurs only with the svg directive applied.

@DanielKucal
Copy link
Contributor

I've noticed the same behavior. As a fix I used $event.stopPropagation() method in (click) handler.

@victorbadila
Copy link

The latest version available in the moment of posting this still has this problem. Daniel's solution above proved a fix for my case though.

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

No branches or pull requests

3 participants