vladotesanovic / ngSemantic

Angular 2 building blocks :package: based on Semantic UI
https://ng-semantic.herokuapp.com/
MIT License
973 stars 148 forks source link

Popup should use event.currentTarget #163

Open flemeur opened 7 years ago

flemeur commented 7 years ago

I'm experiencing an issue using the popup component. If I have a button with an icon inside and click on the icon the popup will use the icon as element for the popup instead of the button itself. This can be avoided by using event.currentTarget (https://github.com/vladotesanovic/ngSemantic/blob/master/src/popup/popup.ts#L31) which always points to the element the handler is attached to (the button), instead of the element that created the event (the button or the icon)

See: https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget

Ralla commented 7 years ago

I would love to see a fix for this.

marsdk commented 7 years ago

+1 on this