Open Event links in new tab
-
I want to have some event links open in a new tab. I do this by adding target=”_blank” to the anchor tag in #_EVENTLINK and in #_EVENTIMAGE (using the em_event_output_placeholder filter). This works correctly in List view but in Grid view it opens the url in a new tab but also redirects the current tab to the target url. This problem is due to the following code in events-manager.js:
$(document).on('click', '.em-grid .em-item[data-href]', function(e){ if( e.target.type !== 'a' ){ window.location.href = this.getAttribute('data-href'); } });
Commenting out the above code fixes the problem. What is the purpose of this code and why is it necessary? This was introduced in version 6.3 in changeset 2849382
I hope this can get fixed in the next release.
- The topic ‘Open Event links in new tab’ is closed to new replies.