Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollContainer scrolling with focus results in weird behavior #63055

Open
Pacifist-Penguin opened this issue Jul 15, 2022 · 1 comment
Open
Milestone

Comments

@Pacifist-Penguin
Copy link

Godot version

4.0.alpha12

System information

macOS catalina 10.15.7

Issue description

scroll_container_bugreport.webm

Steps to reproduce

  1. open a minimal reproduction project
  2. focus button
  3. scroll down the page with ui_down
  4. hold ui_up

Minimal reproduction project

ScrollContainer-focus-bug.zip

@Pacifist-Penguin Pacifist-Penguin changed the title ScrollContainer scrolling with focus isn't ScrollContainer scrolling with focus results in weird behavior Jul 15, 2022
@Chaosus Chaosus added this to the 4.0 milestone Jul 16, 2022
@KoBeWi KoBeWi modified the milestones: 4.0, 4.x Feb 26, 2023
drwhut added a commit to drwhut/godot that referenced this issue Jan 23, 2024
The issue was that when the engine was deciding automatically where
the focus neighbour of a control was, it did not take ScrollContainers
into account, so controls outside of the container were technically
closer in distance to the currently focused control than the controls
within the container that were not in view.

This has being fixed by checking for ScrollContainers along the way
in determining where the 'base' control is in the current scene.
If there are no valid neighbours within the container that the focus
can move to, the function proceeds as normal, and focus goes outside
of the container.

This issue has already been reported in Godot, see:
godotengine#63055

The fix was based on this PR for the given issue:
godotengine#63059
drwhut added a commit to drwhut/godot that referenced this issue Sep 9, 2024
The issue was that when the engine was deciding automatically where
the focus neighbour of a control was, it did not take ScrollContainers
into account, so controls outside of the container were technically
closer in distance to the currently focused control than the controls
within the container that were not in view.

This has being fixed by checking for ScrollContainers along the way
in determining where the 'base' control is in the current scene.
If there are no valid neighbours within the container that the focus
can move to, the function proceeds as normal, and focus goes outside
of the container.

This issue has already been reported in Godot, see:
godotengine#63055

The fix was based on this PR for the given issue:
godotengine#63059
@Rindbee
Copy link
Contributor

Rindbee commented Dec 31, 2024

This issue seems to have been fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants