Skip to content

Commit fc00b93

Browse files
author
Lauren McCarthy
committed
fixing ontouchend check to account for multiple touches
1 parent ac0f309 commit fc00b93

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/p5.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3458,7 +3458,9 @@ amdclean['inputtouch'] = function (require, core) {
34583458
};
34593459
p5.prototype.ontouchend = function (e) {
34603460
this._updateTouchCoords(e);
3461-
this._setProperty('touchIsDown', false);
3461+
if (this.touches.length === 0) {
3462+
this._setProperty('touchIsDown', false);
3463+
}
34623464
var context = this._isGlobal ? window : this;
34633465
var executeDefault;
34643466
if (typeof context.touchEnded === 'function') {

0 commit comments

Comments
 (0)