Skip to content

Repeated Pointer Events in Phaser with Overlapping HTML Elements #6697

@laineus

Description

@laineus

Version

  • Phaser Version:

v3.70.0 or less

  • Operating system:

Windows11, Ubuntu 22.04

  • Browser:

Google Chrome 120.0.6099.129
Touch device or Touch device emulator of Chrome dev tools

Description

When an HTML element overlaps the Canvas tag due to styles like 'position: absolute', the GameObject's pointer events are executed multiple times.

Example Test Code

Demo:
https://codepen.io/laineus/pen/RwdNNgJ

Additional Information

I believe this issue becomes problematic when using Phaser and HTML together to create a user interface.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions