mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Call forceRerender instead of setText
This commit is contained in:
@@ -1032,9 +1032,10 @@ Blockly.BlockSvg.prototype.updateColour = function() {
|
||||
}
|
||||
|
||||
// Bump every dropdown to change its colour.
|
||||
// TODO (#1456)
|
||||
for (var x = 0, input; input = this.inputList[x]; x++) {
|
||||
for (var y = 0, field; field = input.fieldRow[y]; y++) {
|
||||
field.setText(null);
|
||||
field.forceRerender();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -115,10 +115,8 @@ Blockly.FieldDropdown.prototype.init = function() {
|
||||
' ' + Blockly.FieldDropdown.ARROW_CHAR));
|
||||
|
||||
Blockly.FieldDropdown.superClass_.init.call(this);
|
||||
// Force a reset of the text to add the arrow.
|
||||
var text = this.text_;
|
||||
this.text_ = null;
|
||||
this.setText(text);
|
||||
// Make sure the arrow gets rendered.
|
||||
this.forceRerender();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user