Skip to content

Commit ba0c27c

Browse files
authored
fix: Fix bug that could prevent dismissing field editors on Enter (#9986)
* fix: Fix bug that could prevent dismissing field editors on Enter * chore: Remove errant logging
1 parent 08f54db commit ba0c27c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/blockly/core/field_input.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ export abstract class FieldInput<T extends InputTypes> extends Field<
601601
if (e.key === 'Enter') {
602602
WidgetDiv.hideIfOwner(this);
603603
dropDownDiv.hideWithoutAnimation();
604+
// Prevent this from also being handled by the Enter keyboard shortcut,
605+
// which can re-show the field editor after we just dismissed it.
606+
e.stopPropagation();
604607
} else if (e.key === 'Escape') {
605608
this.setValue(
606609
this.htmlInput_!.getAttribute('data-untyped-default-value'),

0 commit comments

Comments
 (0)