mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
fix: Adds check for changedTouches (#5869)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user