From 846b6fc97ea99890ba496a40b4654b156210604a Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Fri, 12 Jun 2026 11:21:20 -0700 Subject: [PATCH 1/2] fix: Fix bug that could prevent dismissing field editors on Enter --- packages/blockly/core/field_input.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/blockly/core/field_input.ts b/packages/blockly/core/field_input.ts index 90f53ad1bd2..72ca817f01b 100644 --- a/packages/blockly/core/field_input.ts +++ b/packages/blockly/core/field_input.ts @@ -506,6 +506,8 @@ export abstract class FieldInput extends Field< */ protected widgetDispose_() { // Non-disposal related things that we do when the editor closes. + console.log('widget dispose'); + console.trace(); this.isBeingEdited_ = false; this.isTextValid_ = true; // Make sure the field's node matches the field's internal value. @@ -601,6 +603,9 @@ export abstract class FieldInput extends Field< if (e.key === 'Enter') { WidgetDiv.hideIfOwner(this); dropDownDiv.hideWithoutAnimation(); + // Prevent this from also being handled by the Enter keyboard shortcut, + // which can re-show the field editor after we just dismissed it. + e.stopPropagation(); } else if (e.key === 'Escape') { this.setValue( this.htmlInput_!.getAttribute('data-untyped-default-value'), From b530dd68d80108a48885472b209ef53220eb6401 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Fri, 12 Jun 2026 11:22:03 -0700 Subject: [PATCH 2/2] chore: Remove errant logging --- packages/blockly/core/field_input.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/blockly/core/field_input.ts b/packages/blockly/core/field_input.ts index 72ca817f01b..0da8371c015 100644 --- a/packages/blockly/core/field_input.ts +++ b/packages/blockly/core/field_input.ts @@ -506,8 +506,6 @@ export abstract class FieldInput extends Field< */ protected widgetDispose_() { // Non-disposal related things that we do when the editor closes. - console.log('widget dispose'); - console.trace(); this.isBeingEdited_ = false; this.isTextValid_ = true; // Make sure the field's node matches the field's internal value.