When user edits text in a field, set text, not value.

Existing text-editable fields don’t care (dropdown care, but are not
text-editable).  But a note picker needs to set its value to 60 if text
is set to ‘C4’.
This commit is contained in:
Neil Fraser
2016-11-24 07:29:39 -08:00
parent e8e8de93bb
commit 065e801a08

View File

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