Groups events fired during field input change

This commit is contained in:
alschmiedt
2018-12-13 12:52:55 -08:00
parent 8422f931f1
commit aae15f01f4

View File

@@ -281,7 +281,9 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(_e) {
var text = htmlInput.value;
if (text !== htmlInput.oldValue_) {
htmlInput.oldValue_ = text;
Blockly.Events.setGroup(true);
this.setValue(text);
Blockly.Events.setGroup(false);
this.validate_();
} else if (goog.userAgent.WEBKIT) {
// Cursor key. Render the source block to show the caret moving.