frend / frend.co

Frend — A collection of accessible, modern front-end components.
http://frend.co
MIT License
635 stars 25 forks source link

`e.target` -› `e.currentTarget` in `_eventOpenPointer()` #102

Closed davidhund closed 7 years ago

davidhund commented 7 years ago

Using e.currentTarget instead of e.target fixes issues with modal link containing sub-elements. Resolves #100

davidhund commented 7 years ago

Woop woop! 🚀

PS: Just now I realized the exact same thing [c|sh]ould be done for Tabs: at https://github.com/frend/frend.co/blob/develop/_components/tabs/tabs.js#L134

_showTab(e.currentTarget);

(This allows e.g. a span in the a.fr-tabs__tab)

davidhund commented 7 years ago

@adamduncan — could you please publish this latest fr-dialogmodal v1.0.3 to npm if you have not already? And do you want me to PR the similar fix for fr-tabs?

adamduncan commented 7 years ago

Thanks @davidhund! Tried publishing 1.0.3 but getting 'previously published' npm errors. I might need to bump to 1.0.4 instead.

Appreciate the tabs PR as well, thank you. Thought we did a currentTarget sweep last year, but seems we've missed a couple. I'll get your contributions wrapped up shortly.