diff --git a/core/field_textinput.js b/core/field_textinput.js index bd97f5fcb..9b389c5a8 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -456,7 +456,7 @@ Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_ = function(e) { Blockly.WidgetDiv.hide(); Blockly.DropDownDiv.hideWithoutAnimation(); } else if (e.keyCode == Blockly.utils.KeyCodes.ESC) { - this.htmlInput_.value = this.htmlInput_.defaultValue; + this.setValue(this.htmlInput_.untypedDefaultValue_); Blockly.WidgetDiv.hide(); Blockly.DropDownDiv.hideWithoutAnimation(); } else if (e.keyCode == Blockly.utils.KeyCodes.TAB) {