Harryk89 Posted Tuesday at 04:49 PM Share Posted Tuesday at 04:49 PM I have a game in Pixi.js v8 and a button with a handler that opens a site in a new tab. But mobile browsers see this as a popup and block the site from opening. How to get around this? Quote this.faqButton.on("pointerdown", () => { window.open("https://github.com/pixijs/open-games", "_blank"); }); and tried this Quote this.faqButton.on("pointerdown", () => { const link = document.createElement('a'); link.href = 'https://github.com/pixijs/open-games'; link.target = '_blank'; link.rel = 'noopener noreferrer'; link.style.display = 'none'; document.body.appendChild(link); link.click(); }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.