@@ -17,7 +17,6 @@ import {BlockSvg} from '../block_svg.js';
1717import { Field } from '../field.js' ;
1818import { getFocusManager } from '../focus_manager.js' ;
1919import type { IFocusableNode } from '../interfaces/i_focusable_node.js' ;
20- import { isFocusableNode } from '../interfaces/i_focusable_node.js' ;
2120import * as registry from '../registry.js' ;
2221import { WorkspaceSvg } from '../workspace_svg.js' ;
2322import { Marker } from './marker.js' ;
@@ -374,17 +373,8 @@ export class LineCursor extends Marker {
374373 *
375374 * @returns The current field, connection, or block the cursor is on.
376375 */
377- override getCurNode ( ) : IFocusableNode | null {
378- // Ensure the current node matches what's currently focused.
379- const focused = getFocusManager ( ) . getFocusedNode ( ) ;
380- const block = this . getSourceBlockFromNode ( focused ) ;
381- if ( block && block . workspace === this . workspace ) {
382- // If the current focused node corresponds to a block then ensure that it
383- // belongs to the correct workspace for this cursor.
384- this . setCurNode ( focused ) ;
385- }
386-
387- return super . getCurNode ( ) ;
376+ getCurNode ( ) : IFocusableNode | null {
377+ return getFocusManager ( ) . getFocusedNode ( ) ;
388378 }
389379
390380 /**
@@ -395,12 +385,8 @@ export class LineCursor extends Marker {
395385 *
396386 * @param newNode The new location of the cursor.
397387 */
398- override setCurNode ( newNode : IFocusableNode | null ) {
399- super . setCurNode ( newNode ) ;
400-
401- if ( isFocusableNode ( newNode ) ) {
402- getFocusManager ( ) . focusNode ( newNode ) ;
403- }
388+ setCurNode ( newNode : IFocusableNode ) {
389+ getFocusManager ( ) . focusNode ( newNode ) ;
404390
405391 // Try to scroll cursor into view.
406392 if ( newNode instanceof BlockSvg ) {
0 commit comments