godotengine / godotengine/godot

godot focus is not working correctly

Open
#91,968 0 comments 0 reactions 0 assignees View on GitHub
discussion topic:gui topic:input
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.2.2.stable.mono.official [15073afe3]

### System information

Kubuntu 22.04

### Issue description

The default control focus functionality does not follow the vbox, hbox layout which all layout controls can be derived.
Instead it just searches for the next control on the y and x axis rather then the next in the hierarchical scene layout.

### Steps to reproduce

- Download project
- Run the control scene
- select a empty slot
- navigate up, down, left, and right
- see that it does not find the correct child but instead just searches for whatever is closest on the container's axis

### Minimal reproduction project (MRP)

[Focus Bug.zip](https://github.com/godotengine/godot/files/15314974/Focus.Bug.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.