Skip to content

Conversation

@fleitz
Copy link
Contributor

@fleitz fleitz commented Jul 6, 2020

<a href="#foo"> <div> <img src="clickable_image"> </div> </a>
Expected result: Clicking on image results in tracking

Actual Result:
Clicking on image does not result in tracking.

@ankane
Copy link
Owner

ankane commented Oct 6, 2020

Hey @fleitz, thanks for the PR, and sorry for the delay (have been focused on other projects). This change makes sense to me. Instead of setting matchedElement on the event, it would be good to make this the matched element (as libraries like jQuery do).

@fleitz
Copy link
Contributor Author

fleitz commented Oct 6, 2020

Yeah, that sounds like a way cleaner way to implement.

@fleitz
Copy link
Contributor Author

fleitz commented Oct 7, 2020

@ankane implemented.

Copy link
Owner

@ankane ankane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fleitz, looking better. Added a few comments inline.

Copy link
Owner

@ankane ankane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fleitz, added a few more comments. Please follow the existing spacing everywhere.

return obj;
}

function eventProperties(e) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change needed on this line.

@ankane ankane merged commit b1d5dd1 into ankane:master Oct 7, 2020
@ankane
Copy link
Owner

ankane commented Oct 7, 2020

Thanks @fleitz! This is a great feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants