phaser icon indicating copy to clipboard operation
phaser copied to clipboard

Pointer events fired on window.top

Open rvh1986 opened this issue 2 years ago • 0 comments

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/

Additional Information

rvh1986 avatar Feb 22 '22 11:02 rvh1986