Open ksdavidc opened 2 months ago
BlockTypeInfo.js:509 Uncaught TypeError: Cannot read properties of undefined (reading 'getAllVariableNamesInScopeByType')
at BlockTypeInfo._createBlocks (BlockTypeInfo.js:509:48)
at BlockTypeInfo.getBlocks (BlockTypeInfo.js:387:26)
at openPopup (userscript.js:114:32)
at Blockly.Gesture.doWorkspaceClick_ (userscript.js:448:79)
at Blockly.Gesture.handleUp (projects.bundle.js:2:11379414)
at HTMLDocument.s (projects.bundle.js:2:11997165)
_createBlocks @ BlockTypeInfo.js:509
getBlocks @ BlockTypeInfo.js:387
openPopup @ userscript.js:114
Blockly.Gesture.doWorkspaceClick_ @ userscript.js:448
Blockly.Gesture.handleUp @ projects.bundle.js:2
s @ projects.bundle.js:2
projects.bundle.js:2 Trying to cancel a gesture recursively.
projects.bundle.js:2 Trying to cancel a gesture recursively.
https://github.com/ScratchAddons/ScratchAddons/issues/7794#issuecomment-2343285446
The "Select Self" plugin seems to be the culprit. Please see the above discussion for a fuller explanation and the possible routes to a solution.
More data: "Select self", https://github.com/STForScratch/ScratchTools/blob/main/features/select-self/script.js, it seems, is adding menu items to certain blocks (that seem unrelated to adding self?!), for example, _mouse_
and _random_
to the of
block, even though its code (below) appears to be attempting to only add "Stage" to the sensing block. (pure conjecture, I have no clue)
let ORIGINAL_DATA = {
motion_glideto_menu: [
["random position", "_random_"],
["mouse-pointer", "_mouse_"],
],
motion_goto_menu: [
["random position", "_random_"],
["mouse-pointer", "_mouse_"],
],
motion_pointtowards_menu: [["random position", "_random_"]],
sensing_touchingobjectmenu: [
["mouse-pointer", "_mouse_"],
["edge", "_edge_"],
],
sensing_of_object_menu: [["Stage", "_stage_"]],
sensing_distancetomenu: [["mouse-pointer", "_mouse_"]],
};
I have tested these blocks in a project, https://scratch.mit.edu/projects/1067296787/editor/, and I notice that:
Describe the bug. What is going wrong?
[ this is being crossposted to Scratch Tools.) (I know compatibility is not supported, but am reporting since this indicates existence of a possible bug in SA as well)
It appears that something in scratchtools is in conflict with the scratchaddons “insert block by name” plugin, causing the mouse to be “locked”, i.e. moving the mouse moves the content of the block editor pane, but one can't click or otherwise get out.
What is causing the bug?
https://discord.com/channels/945340853189247016/1259626053601853460
https://github.com/user-attachments/assets/4be3c3ce-7b95-4a58-88a4-eb1460c986b2
at the start of video, mouse is locked when attempting block insertion, and editor content is moving with mouse. restarting goes back to normal, allowing block suggestion popup, but subsequently locking again. json:
my ST.json my sa.json
from another user with same problem: scratchtools-settings (2).json scratch-addons-settings (2).json
version: SA 1.39.1 and ST .3.9 Chrome 128.0.6613.120 (Official Build) (x86_64) Mac Sonoma
Anything else?
this has been crossposted to SA and discord.