Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tracking.js module prevent links to be opened in new tabs#6384

Merged
amercader merged 2 commits into
ckan:masterfrom
pdelboca:fix-tracking-js
Sep 10, 2021
Merged

tracking.js module prevent links to be opened in new tabs#6384
amercader merged 2 commits into
ckan:masterfrom
pdelboca:fix-tracking-js

Conversation

@pdelboca
Copy link
Copy Markdown
Member

@pdelboca pdelboca commented Sep 9, 2021

The current module overrides the default action of click() events with a location.href = url; call when the ajax call is completed. This implementation will cause some buggy behavior if the user wants to open the link in a new tab.

Example

<!-- This will open the link in a new tab -->
<a href="http://www.example.org/" target="_blank">Useless Link</a>

<!-- This will open the link in the current tab -->
<a class="resource-url-analytics" href="http://www.example.org/" target="_blank">Useless Link</a>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants