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

Resize while editing field leads to crash #7809

Closed
1 task done
laurensvalk opened this issue Jan 28, 2024 · 1 comment · Fixed by #8646
Closed
1 task done

Resize while editing field leads to crash #7809

laurensvalk opened this issue Jan 28, 2024 · 1 comment · Fixed by #8646
Labels
issue: bug Describes why the code or behaviour is wrong
Milestone

Comments

@laurensvalk
Copy link
Contributor

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

A resize appears to lead to a crash if a field is being edited at the same time.

The reproduction steps below are a bit artificial, but it originally occurred during normal usage.

If you resize yourself, it usually doesn't happen because the field gets unselected. But it can happen due to an external resize while editing. In my case, I think my computer went to sleep/lock screen while editing. On opening again, I was greeted by the red screen 😄

Reproduction steps

See video below:

  1. Go to the default advanced playground with Zelos.
  2. Connect at least two blocks, such as two repeat blocks as shown below.
  3. Edit a field. While you do, enforce an external resize. The easiest way is to toggle the device test built into the Chrome web dev tools, and then back again. If it isn't already, make sure it's set to one of the non-responsive devices (e.g. pick an iPhone from the dimension list).

Stack trace

Uncaught Error: Block has parent
    at BlockSvg$$module$build$src$core$block_svg.moveBy (block_svg.ts:388:13)
    at bumpObjectIntoBounds$$module$build$src$core$bump_objects (bump_objects.ts:80:12)
    at FieldNumber$$module$build$src$core$field_number.repositionForWindowResize (field_input.ts:646:32)
    at repositionForWindowResize$$module$build$src$core$widgetdiv (widgetdiv.ts:270:42)
    at inject.ts:226:17
    at f (browser_events.ts:65:9)
moveBy @ block_svg.ts:388
bumpObjectIntoBounds$$module$build$src$core$bump_objects @ bump_objects.ts:80
repositionForWindowResize @ field_input.ts:646
repositionForWindowResize$$module$build$src$core$widgetdiv @ widgetdiv.ts:270
(anonymous) @ inject.ts:226
f @ browser_events.ts:65

Screenshots

crashonresize-2024-01-28_15.31.59.mp4

Browsers

No response

@laurensvalk laurensvalk added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Jan 28, 2024
@maribethb
Copy link
Contributor

Thanks for filing this issue! I've added it to our upcoming queue which means we will address it as soon as possible. We would also accept a PR for this if you'd like to ensure it is fixed in the next release. Thanks!

@maribethb maribethb removed the issue: triage Issues awaiting triage by a Blockly team member label Jan 31, 2024
@maribethb maribethb added this to the Upcoming milestone Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants