fix: Make Escape cancel changes in text fields. (#6923)

This commit is contained in:
Aaron Dodson
2023-03-24 14:56:25 -07:00
committed by GitHub
parent 0708c97ffe
commit d004bd256d

View File

@@ -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();