phaser
phaser copied to clipboard
Pointer events fired on window.top
Version
- Phaser Version: 3.55.2
- Operating system: Windows 10
- Browser: Chrome 98.0.4758.102
Description
Pointer events are fired when clicking in the top window of the page the iframe is embedded on, meanwhile ignore the margin the game is placed from the top or left of the window.
This only happens when the iframe is on the same domain as the page that embeds it.
I'm not sure if this is known behaviour, it seems a bit odd. It can be solved by turning window events off in the GameConfig, but this is not wanted for some games.
Example Test Code
Here's an example of what's happening, the embedded game has a fullscreen and settings button on the right top that can be activated by clicking in the red square just above the iframe.
https://www.joypadmedia.com/pointer-test/