mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
fix: Make Escape cancel changes in text fields. (#6923)
This commit is contained in:
@@ -444,7 +444,7 @@ export abstract class FieldInput<T extends InputTypes> extends Field<string|T> {
|
||||
if (e.key === 'Enter') {
|
||||
WidgetDiv.hide();
|
||||
dropDownDiv.hideWithoutAnimation();
|
||||
} else if (e.key === 'Esc') {
|
||||
} else if (e.key === 'Escape') {
|
||||
this.setValue(
|
||||
this.htmlInput_!.getAttribute('data-untyped-default-value'));
|
||||
WidgetDiv.hide();
|
||||
|
||||
Reference in New Issue
Block a user