Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Input] disableInteractive() with NOT topOnly case #6820

Open
rexrainbow opened this issue May 16, 2024 · 0 comments
Open

[Input] disableInteractive() with NOT topOnly case #6820

rexrainbow opened this issue May 16, 2024 · 0 comments

Comments

@rexrainbow
Copy link
Contributor

rexrainbow commented May 16, 2024

Version

  • Phaser Version: 3.80.1
  • Operating system: win11
  • Browser: chrome, firefox

Description

Test code, set secne.input.topOnly to false

  • Disable line 19 this.disableInteractive(), it will log 0, 1 shown that 2 game objects has been touched
  • Enable line 19, only 1 will be shown

The root cause might be:

  1. In processDragUpEvent method, the loop is based on this._drag list
  2. In disableInteractive() method called under 'dragend' event, it will remove game object from this._drag list, that will cause loop error of step1

Might copy this._drag list in step 1 to fix this bug (if length of this._drag is larger than 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant