Skip to content

Commit 575b712

Browse files
author
Winston
committed
On iOS, if I use a pinch gesture in the workspace, these errors appear in the console: Error: Invalid value for <rect> attribute x="NaN"
1 parent 96d5987 commit 575b712

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

core/blockly.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ Blockly.onMouseUp_ = function(e) {
294294
* @private
295295
*/
296296
Blockly.onMouseMove_ = function(e) {
297+
if (event.touches && event.touches.length >= 2) {
298+
return // multi-touch gestures won't have e.clientX
299+
}
297300
var workspace = Blockly.getMainWorkspace();
298301
if (workspace.isScrolling) {
299302
Blockly.removeAllRanges();

0 commit comments

Comments
 (0)