Skip to content

Commit 97ce1c9

Browse files
authored
fix: Fix bug that prevented navigating into and within flyouts. (#606)
* fix: Fix bug that prevented navigating into flyouts. * fix: Fix bug that prevented navigation when a flyout workspace is selected.
1 parent fd1e4fb commit 97ce1c9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/actions/arrow_navigation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export class ArrowNavigation {
7979
// @ts-expect-error private method
8080
isHandled = toolbox && toolbox.selectChild();
8181
if (!isHandled && flyout) {
82-
Blockly.getFocusManager().focusTree(flyout.getWorkspace());
8382
this.navigation.defaultFlyoutCursorIfNeeded(workspace);
8483
}
8584
return true;

src/navigation.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,15 @@ export class Navigation {
303303

304304
const curNode = flyoutCursor.getCurNode();
305305
const sourceBlock = flyoutCursor.getSourceBlock();
306-
if (curNode && !this.isFlyoutItemDisposed(curNode, sourceBlock))
306+
// If the current node is a child of the flyout, nothing needs to be done.
307+
if (
308+
curNode &&
309+
curNode !== flyout.getWorkspace() &&
310+
curNode.getFocusableTree() === flyout.getWorkspace() &&
311+
!this.isFlyoutItemDisposed(curNode, sourceBlock)
312+
) {
307313
return false;
314+
}
308315

309316
const flyoutContents = flyout.getContents();
310317
const defaultFlyoutItem =

0 commit comments

Comments
 (0)