luschn Posted April 11, 2018 Share Posted April 11, 2018 Hi, I am trying to use a FB Share Dialog in my Phaser 3 game, but i assume since the pointerdown does not just get called directly on mouse click, the Dialog gets blocked by the browser: let someButton= this.add.sprite(200, 500, 'someButton', 0).setInteractive(); buttonLeaderboard.on('pointerdown', () => { FB.ui({ method: 'share', href: 'https://mydomain.com' }); }, this); Does anyone have a solution for this, or for popups in general? Opening a new window would also be fine (using sharer.php instead), but that one gets blocked too: window.open(url, windowName, [windowFeatures]) Link to comment Share on other sites More sharing options...
Antriel Posted April 11, 2018 Share Posted April 11, 2018 https://github.com/photonstorm/phaser/issues/3497 I'm literally working on some hacking solution for my project atm. I'm thinking, instead of pointerdown, use pointerover/out to store some global `action` variable while it's rolled over. And before game boots add `document.addEventListener('click', function(event) { ... });` where you handle the stored action, if any. luschn 1 Link to comment Share on other sites More sharing options...
luschn Posted April 12, 2018 Author Share Posted April 12, 2018 Ok, if there is only a workaround/hack, i would just skip the Share Button for now. Maybe there is another event that fires immediately? Should not be too hard to implement with a separate event, i guess. I subscribed to your issue on Github, thanx for the answer and thanx for creating that issue! Link to comment Share on other sites More sharing options...
Recommended Posts