Skip to content
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

variable event is undeclared in Blockly.Field.prototype.onMouseDown_ #3093

Open
alexcui03 opened this issue Aug 25, 2023 · 1 comment
Open

Comments

@alexcui03
Copy link

Actual Behavior

Use undefined event variable in Blockly.Field.prototype.onMouseDown_. see

Closure compiler raise an error when set undefinedVars in jscomp_error. (It won't show by default)

core/field.js:751:72: ERROR - [JSC_UNDEFINED_VARIABLE] variable event is undeclared
  751|   this.useTouchInteraction_ = Blockly.Touch.getTouchIdentifierFromEvent(event) !== 'mouse';
                                                                               ^^^^^

Maybe it should be Blockly.Touch.getTouchIdentifierFromEvent(e) instead of Blockly.Touch.getTouchIdentifierFromEvent(event)?

@eYuM-coder
Copy link

Hello @alexcui03, fortunately, you've resolved this issue by correcting the parameter usage from 'event' to 'e', this is the default for all functions that take in or use user input whether it is from a mouse click or key press event. I'll make sure to let the Scratch Team know via contact through the contact us page on Scratch. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants