-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop when handling 'pointermove' events. #8396
Comments
Hi @mikeharv. Thanks for finding this. We'd take a patch for it, if you would be so kind as to submit one. |
@mikeharv can you assign this issue to me? |
@cpcallen We've been running this patch for a couple weeks without any reported issues: https://github.com/code-dot-org/code-dot-org/blob/189a4fd5e223ffebcaf19677d0d9788e13a52625/apps/src/blockly/addons/cdoGesture.js It does repeat some code shared by @AbhinavKRN I do not have permissions to assign issues from this repository, sorry! |
@mikeharv whom to contact then? |
Hiya @AbhinavKRN if you're still interested feel free to give this a shot! |
@BeksOmega On it! |
@BeksOmega Can you let me know in which typeScript file do I get to read the code of handleTouch function and handleMoveTouch function |
Did you try searching for those strings in this repo? https://github.com/search?q=repo%3Agoogle%2Fblockly%20handleTouchMove&type=code |
Check for duplicates
Description
Users get
RangeError: Maximum call stack size exceeded
if they attempt to drag a block with multiple fingers on a workspace where zoom controls/wheel are disabled.My understanding of these two functions is as follow:
handleMove
Function:handleTouchMove
.handleTouchMove
Function:handleMove
again.If there's a multi-touch event that doesn't meet the conditions for a pinch zoom, an infinite loop is created.
Code.org use NewRelic to detect JS errors like this. Since migrating two more labs to Google Blockly this week (:tada:), the errors have been above our threshold causing an alarm. This alarm pages our on-call engineer.
In order to fix this, I was able to monkey-patch
handleMoveTouch
to independently handle the touch events without needing to callhandleMove
again: code-dot-org/code-dot-org#59864Reproduction steps
Stack trace
...repeats infinitely...
Screenshots
Browsers
No response
The text was updated successfully, but these errors were encountered: