-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
component: eventscomponent: renderingissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Milestone
Description
Describe the bug
Calling setFieldValue and changing the field text to a different length on create event trigger causes rendering issue with insertion marker and with connection alignment.
To Reproduce
Steps to reproduce the behavior:
- Add the following code into the Blockly playground:
function reproCode() {
workspace.addChangeListener(
function(event) {
if (event.type == Blockly.Events.CREATE) {
var block = workspace.getBlockById(event.blockId);
if (block.type == 'colour_random') {
block.setFieldValue('hey');
}
}
}
);
}
as well as call to reproCode() after playground workspace has been instantiated.
2.
3. Load the following xml:
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="lists_create_with" id="Cwr1zGV:9Et{nyS[|`*U" x="63" y="138">
<mutation items="3"></mutation>
</block>
</xml>
- Drag a colour_random block directly over into create list connection
- Observe how insertion marker size is incorrect
- Connect block and observe how connection is misaligned.
Expected behavior
Block insertion marker should reflect new size of block after field value was changed and connection should be aligned correctly.
Additional context
Caused the issue with plane demo in bug #3639
Also tried to repro with triggering of UI event, where label changes size and did not see issue with connection alignment, but did also see issue with insertion marker size.
Metadata
Metadata
Assignees
Labels
component: eventscomponent: renderingissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
