blockly > FocusManager > getFocusedNode

FocusManager.getFocusedNode() method

Returns the current IFocusableNode with focus (which is always tied to a focused IFocusableTree), or null if there isn't one.

Note that this function will maintain parity with IFocusableTree.getFocusedNode(). That is, if a tree itself has focus but none of its non-root children do, this will return null but getFocusedTree() will not.

Note also that if ephemeral focus is currently captured (e.g. using takeEphemeralFocus) then the returned node here may not currently have DOM focus.

Signature:

getFocusedNode(): IFocusableNode | null;

Returns:

IFocusableNode | null