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

scroll_started and scroll_ended signals don't get emitted for ScrollContainer on Windows but they do work on Android #81512

Closed
enrikqose opened this issue Sep 10, 2023 · 5 comments · Fixed by #81517

Comments

@enrikqose
Copy link

Godot version

4.1.1.stable.official [bd6af8e]

System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3050 Ti Laptop GPU (NVIDIA; 27.21.14.6660) - Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 Threads)

Issue description

scroll_started and scroll_ended signals don't get emitted for ScrollContainer on Windows (haven't tested on linux or mac), but they do work on Android (haven't tested on iOS)

Steps to reproduce

You can connect scroll_started or scroll_ended signal of a ScrollContainer control to a function and you will notice that the callback is never called on windows, but when tested on android it works.

Minimal reproduction project

scroll_event_issue.zip

@AThousandShips
Copy link
Member

AThousandShips commented Sep 10, 2023

What ways are you scrolling? With the scroll wheel? Dragging with the mouse?

Edit: The scroll signals seem dedicated to drag events, i.e. touch input, should probably be documented. Unsure if it is considered a bug.

@enrikqose
Copy link
Author

Tried scrolling with the scroll wheel, dragging the scrollbar with the mouse and also using the scrolling gesture (Two finger scroll) on the touchpad.

@AThousandShips
Copy link
Member

It only supports touch, as in screen touch, unsure if this is an oversight or by design though, if the latter it should be documented

@Calinou
Copy link
Member

Calinou commented Sep 10, 2023

You need to enable Emulate Touch From Mouse in the Project Settings for these signals to be emitted, then use the left mouse button to drag-scroll on the main area (not the scrollbar). These signals are only emitted for drag-based scrolling.

For standard mouse wheel/keyboard/scrollbar-based scrolling, we should add different signals to avoid breaking compatibility with existing projects.

@AThousandShips
Copy link
Member

AThousandShips commented Sep 10, 2023

Note that this signal was originally added to solve a bug where buttons could be pressed while scrolling, so I'm unsure what use the signal has elsewhere:

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

Successfully merging a pull request may close this issue.

4 participants