目录

Focus Error Codes

The focus error codes describe common issues and handling directions when a component fails to obtain focus, helping you locate focus exceptions and take appropriate measures. Only the error codes specific to this module are described below. For details about the universal error codes, see Universal Error Codes.

150001 Component Not Focusable

Error Message

the component cannot be focused.

Description

This error code is reported when the current component is not focusable. This error code is of the string type.

Possible Causes

The component is not focusable by default, or you set the focusable attribute of the component to false. For details about the focus acquisition capability, see Component Focusability.

Solution

Check whether the current component is focusable and whether focusable is set to true.

150002 Ancestor Component Not Focusable

Error Message

This component has an unfocusable ancestor.

Description

This error code is reported when an ancestor of the current component is not focusable. This error code is of the string type.

Possible Causes

The ancestor component is not focusable by default, or you set the focusable attribute of the component to false. For details about the focus acquisition capability, see Component Focusability.

Solution

Check whether the ancestor component is focusable and whether focusable is set to true.

150003 Component Does Not Exist

Error Message

the component is not on tree or does not exist.

Description

This error code is reported when the ID passed in points to a component that does not exist or is not mounted to the component tree. This error code is of the string type.

Possible Causes

Solution

Use the correct ID or component, and ensure that the component is mounted, visible, and focusable.