mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Fix escape key on all fields. (#4934)
Currently the escape key fails to revert the value. This is the inherited root of all type-in fields, including number, angle, and note. Fixes #4910
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user