From 3f4f5057919fdb4a329e9d2b15378c5c5831ae3b Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Tue, 25 Jan 2022 14:50:00 -0800 Subject: [PATCH] fix: Adds check for changedTouches (#5869) --- core/touch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/touch.js b/core/touch.js index b0eb0b347..53f3440d0 100644 --- a/core/touch.js +++ b/core/touch.js @@ -217,7 +217,7 @@ exports.checkTouchIdentifier = checkTouchIdentifier; * @alias Blockly.Touch.setClientFromTouch */ const setClientFromTouch = function(e) { - if (utilsString.startsWith(e.type, 'touch')) { + if (utilsString.startsWith(e.type, 'touch') && e.changedTouches) { // Map the touch event's properties to the event. const touchPoint = e.changedTouches[0]; e.clientX = touchPoint.clientX;