mixpanel-js icon indicating copy to clipboard operation
mixpanel-js copied to clipboard

Target attribute other than _blank is ignored.

Open WebproJoeZ opened this issue 1 year ago • 1 comments

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 avatar Jan 22 '24 01:01 WebproJoeZ