Skip to content

Commit 6105c1a

Browse files
authored
Emit pointerout always after pointerup on touch.
Now pointerout will always emit after pointerup.
1 parent b94f655 commit 6105c1a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/input/InputPlugin.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,11 +1461,16 @@ var InputPlugin = new Class({
14611461
continue;
14621462
}
14631463

1464-
// If pointerup is triggered, we have no need for pointerout.
1465-
this._over[pointer.id] = [];
1466-
14671464
gameObject.emit(Events.GAMEOBJECT_POINTER_UP, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);
14681465

1466+
// Clear over and emit 'pointerout' on touch.
1467+
if (pointer.wasTouch)
1468+
{
1469+
this._over[pointer.id] = [];
1470+
1471+
gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);
1472+
}
1473+
14691474
if (_eventData.cancelled)
14701475
{
14711476
aborted = true;

0 commit comments

Comments
 (0)