Skip to content

Commit

Permalink
fix: maximum call stack exceeded (deriv-com#16865)
Browse files Browse the repository at this point in the history
  • Loading branch information
rupato-deriv authored Sep 24, 2024
1 parent f8824de commit 4405123
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/bot-skeleton/src/scratch/hooks/gesture.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Blockly.Gesture.prototype.updateIsDraggingFromFlyout = function () {
Blockly.Events.setGroup(true);
}

// This is done because when this flag is set to true inside Blockly,
// the handleMove function is called, which also triggers handleTouchMove
// if the flag is false. This method wont be called everything will be handled in handleMove.
const is_mobile = window.innerWidth < 768;
if (is_mobile) this.isMultiTouch_ = false;

// The start block is no longer relevant, because this is a drag.
this.startBlock.workspace.clearGesture();
this.startBlock = null;
Expand Down

0 comments on commit 4405123

Please sign in to comment.