Skip to content

UI GUI Navigation documentation is incorrect #10136

Open
@okachobi

Description

@okachobi

Your Godot version:
4.3

Issue description:
Section entitled "Necessary code" is incorrect or godot has a bug. A VBoxContainer was created in a scene with a root Control node. the VBoxContainer contains 4 buttons with a custom theme set. The Control has a script:

func _ready():
	$StartButton.grab_focus()

The scene was instantiated and added to an active scene that has a Node2D root node.

This does not appear to result in the StartButton taking focus. Instead, it appears it is necessary to set focus somewhere in _process() or with a timer signal.

URL to the documentation page:
Necessary code

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationbugcontent:example codeIssues and PRs involving code examplestopic:gui

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions