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

Target attribute other than _blank is ignored. #413

Open
WebproJoeZ opened this issue Jan 22, 2024 · 1 comment
Open

Target attribute other than _blank is ignored. #413

WebproJoeZ opened this issue Jan 22, 2024 · 1 comment

Comments

@WebproJoeZ
Copy link

WebproJoeZ commented Jan 22, 2024

We have noticed during our testing that when a url is passed through mixpanel javascript client, the target attribute with a value other than _blank is ignored. Therefore, no new tabs are opened, the linked page is opened in the original window.

Our very naive solution is to change this condition in mixpanel.js from
element.target === '_blank'
to
!(element.target.trim() === "")

to allow the target value to pass through. We are not aware of the reasons behind only allowing _blank.

Thanks.

@WebproJoeZ WebproJoeZ changed the title Target attribute other than _blank is igored. Target attribute other than _blank is ignored. Jan 22, 2024
@cpanel-jared
Copy link

To update, the following change worked for us as isEmpty() was causing problems.

!!element.target.trim()

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

No branches or pull requests

2 participants