From 09bb13782c47dc23d236a4a648225dbc7c691f4c Mon Sep 17 00:00:00 2001 From: Dana Date: Mon, 7 Dec 2020 15:41:24 -0500 Subject: [PATCH] make sure cancelable is true before calling onPress for touchEnd event --- src/web/Button.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/Button.tsx b/src/web/Button.tsx index 82752e768..cba721c52 100644 --- a/src/web/Button.tsx +++ b/src/web/Button.tsx @@ -279,7 +279,7 @@ export class Button extends ButtonBase { /* 3 */ this._isMouseOver && !this._ignoreTouchEnd ) { - if ('touches' in e) { + if ('touches' in e && e.cancelable) { // Stop the to event sequence to prevent trigger button.onMouseDown e.preventDefault(); if (this.props.onPress) {