From f03a3b765f6f7816c831402f21afa86022b1582c Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Mon, 4 Mar 2024 15:23:48 -0800 Subject: [PATCH 1/2] fix keyboard nav --- pxtblocks/plugins/flyout/verticalFlyout.ts | 2 ++ webapp/src/blocks.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pxtblocks/plugins/flyout/verticalFlyout.ts b/pxtblocks/plugins/flyout/verticalFlyout.ts index f3a818a01e54..37bdddcbf6f6 100644 --- a/pxtblocks/plugins/flyout/verticalFlyout.ts +++ b/pxtblocks/plugins/flyout/verticalFlyout.ts @@ -25,6 +25,8 @@ export class VerticalFlyout implements Blockly.IFlyout { return this.element; } + this.dummyWorkspace.createDom(); + this.element = Blockly.utils.dom.createSvgElement( tagName, { diff --git a/webapp/src/blocks.tsx b/webapp/src/blocks.tsx index d8d5798cd2ae..cb894550bdc9 100644 --- a/webapp/src/blocks.tsx +++ b/webapp/src/blocks.tsx @@ -632,7 +632,7 @@ export class Editor extends toolboxeditor.ToolboxEditor { pxtblockly.FIELD_EDITOR_OPEN_EVENT_TYPE ]; - if (ev.type !== "var_create") { + if (ev.type !== "var_create" && ev.type !== "marker_move") { this.hideFlyout(); } From d4192be825d4171ccbfbbffdedbe683f8fdef6de Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Mon, 4 Mar 2024 15:23:56 -0800 Subject: [PATCH 2/2] fix focus for text dropdown --- pxtblocks/fields/field_textdropdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxtblocks/fields/field_textdropdown.ts b/pxtblocks/fields/field_textdropdown.ts index 9772e957b268..2744f0f05065 100644 --- a/pxtblocks/fields/field_textdropdown.ts +++ b/pxtblocks/fields/field_textdropdown.ts @@ -134,7 +134,7 @@ export class BaseFieldTextDropdown extends Blockly.FieldTextInput { // Focusing needs to be handled after the menu is rendered and positioned. // Otherwise it will cause a page scroll to get the misplaced menu in // view. See issue #1329. - this.menu_!.focus(); + // this.menu_!.focus(); if (this.selectedMenuItem) { this.menu_!.setHighlighted(this.selectedMenuItem);