Skip to content

Commit 3104246

Browse files
authored
Merge pull request phaserjs#4347 from rgk/patch-5
On mobile, have pointerup and pointerout get triggered together.
2 parents 62399a3 + 6105c1a commit 3104246

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/input/InputPlugin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,14 @@ var InputPlugin = new Class({
14891489

14901490
gameObject.emit(Events.GAMEOBJECT_POINTER_UP, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);
14911491

1492+
// Clear over and emit 'pointerout' on touch.
1493+
if (pointer.wasTouch)
1494+
{
1495+
this._over[pointer.id] = [];
1496+
1497+
gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);
1498+
}
1499+
14921500
if (_eventData.cancelled)
14931501
{
14941502
aborted = true;

0 commit comments

Comments
 (0)