@@ -41,6 +41,7 @@ import type {FlyoutButton} from './flyout_button.js';
4141import { getFocusManager } from './focus_manager.js' ;
4242import { Gesture } from './gesture.js' ;
4343import { Grid } from './grid.js' ;
44+ import { MutatorIcon } from './icons/mutator_icon.js' ;
4445import { isAutoHideable } from './interfaces/i_autohideable.js' ;
4546import type { IBoundedElement } from './interfaces/i_bounded_element.js' ;
4647import { IContextMenu } from './interfaces/i_contextmenu.js' ;
@@ -2680,7 +2681,7 @@ export class WorkspaceSvg
26802681
26812682 /** See IFocusableNode.getFocusableTree. */
26822683 getFocusableTree ( ) : IFocusableTree {
2683- return this ;
2684+ return ( this . isMutator && this . options . parentWorkspace ) || this ;
26842685 }
26852686
26862687 /** See IFocusableNode.onNodeFocus. */
@@ -2710,7 +2711,22 @@ export class WorkspaceSvg
27102711
27112712 /** See IFocusableTree.getNestedTrees. */
27122713 getNestedTrees ( ) : Array < IFocusableTree > {
2713- return [ ] ;
2714+ const nestedWorkspaces = this . getAllBlocks ( )
2715+ . map ( ( block ) => block . getIcons ( ) )
2716+ . flat ( )
2717+ . filter (
2718+ ( icon ) : icon is MutatorIcon =>
2719+ icon instanceof MutatorIcon && icon . bubbleIsVisible ( ) ,
2720+ )
2721+ . map ( ( icon ) => icon . getBubble ( ) ?. getWorkspace ( ) )
2722+ . filter ( ( workspace ) => ! ! workspace ) ;
2723+
2724+ const ownFlyout = this . getFlyout ( true ) ;
2725+ if ( ownFlyout ) {
2726+ nestedWorkspaces . push ( ownFlyout . getWorkspace ( ) ) ;
2727+ }
2728+
2729+ return nestedWorkspaces ;
27142730 }
27152731
27162732 /** See IFocusableTree.lookUpFocusableNode. */
0 commit comments