Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update e.target to e.currentTarget when retrieving href from links #10

Merged
merged 1 commit into from
Jan 21, 2023
Merged

Update e.target to e.currentTarget when retrieving href from links #10

merged 1 commit into from
Jan 21, 2023

Conversation

filipalbert
Copy link

Previous version run into a problem with an "a.ajax" tag when it contains other DOM elements which are the actual event targets. This yields a wrong ajax request url, because the event.target is another nested element, which has no href attribute.

Using the event.currentTarget when registering click event listeners for links solves the issue.

@matronator matronator merged commit 86132f7 into matronator:master Jan 21, 2023
@matronator
Copy link
Owner

Thank you!

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.

None yet

2 participants