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

Already on GitHub? Sign in to your account

onInputUp is called twice when dragging is enabled #502

Closed
Overbryd opened this Issue Mar 1, 2014 · 1 comment

Comments

Projects
None yet
2 participants

Overbryd commented Mar 1, 2014

In the following example (running Phaser 1.1.6) the callback for onInputUp is called twice. I didn't expect that. If you don't call enableDrag() the callback is only called once.

var thing = Game.add.sprite(100, 100, "somesprite");
thing.inputEnabled = true;
thing.input.enableDrag();
thing.events.onInputUp.add(function() {
  console.log("onInputUp called");
});

Cheers, Lukas

@photonstorm photonstorm added a commit that referenced this issue Mar 2, 2014

@photonstorm photonstorm Events.onInputUp would be dispatched twice if the Sprite had drag ena…
…bled, now only dispatched once (thanks Overbryd, fixes #502)

Changed webfont URI back to //
442e6bb
Owner

photonstorm commented Mar 2, 2014

Good find - fixed :)

@photonstorm photonstorm closed this Mar 2, 2014

@indiejones indiejones added a commit to indiejones/phaser that referenced this issue Mar 3, 2014

@photonstorm @indiejones photonstorm + indiejones Events.onInputUp would be dispatched twice if the Sprite had drag ena…
…bled, now only dispatched once (thanks Overbryd, fixes #502)

Changed webfont URI back to //
68ee79b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment