-
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
Blocks with a field following a variable field break when a mutator is open #3458
Comments
Thank you for reporting! This reproduces on develop with a slightly different stack trace:
But it's the same root cause. In english: The variable field's initModel method is forcing a rerender of the block before the following fields' svgs can be initialized. This isn't a problem in the block's init method because the block isn't rendered yet, but in the case of a mutator the block is rendered. I would /like/ to try and fix this by getting rid of initModel. (The single use case for initModel is outlined here. In my opinion, the toolbox point is moot because toolboxes don't exist on headless workspaces.) But variable fields are /crazy/ so more drastic measures may need to be taken. Thank you again for reporting! P.S. I really like your work around solution, very creative! |
Thank you Beka for confirming this - for a while I was losing my mind trying to pin this one down :) |
@navilperez to confirm that this is fixed. |
Fixed. |
Describe the bug
In blocks that have mutators that create and delete inputs (dummy or value), if those blocks contain a variable field followed by another field break when the mutator is opened.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The block should render correctly and the fields should be editable even when the mutator is open.
Desktop (please complete the following information):
Stack Traces
Additional context
We noticed this error within our implementation (solo.parallax.com), and tried replacing the blockly core with the 2019 Q3 patch 4 release, which still showed the same error. I then built the most minimal mutating block that still demonstrated the error in the playground (release 2019 Q2) to verify that it wasn't caused by something within our codebase.
The text was updated successfully, but these errors were encountered: