Stay organized with collections
Save and categorize content based on your preferences.
blockly > FocusManager > focusNode
FocusManager.focusNode() method
Focuses DOM input on the specified node, and marks it as actively focused.
Any previously focused node will be updated to be passively highlighted (if it's in a different focusable tree) or blurred (if it's in the same one).
**Important**: If the provided node is not able to be focused (e.g. its canBeFocused() method returns false), it will be ignored and any existing focus state will remain unchanged.
Note that this may update the specified node's element's tabindex to ensure that it can be properly read out by screenreaders while focused.
Signature:
focusNode(focusableNode: IFocusableNode): void;
Parameters
Parameter |
Type |
Description |
focusableNode |
IFocusableNode |
The node that should receive active focus. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-24 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-24 UTC."],[],[]]