GDQuest / GDQuest/learn-gdscript

OSX - Scrolling position differs between trackpad, mouse scroll wheel, and up/down arrow keys

Open
#1,115 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
GDScript
Stars
2.8k
Forks
235
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
**NOTE:** Web version of app works as expected, I'm only noticing this on the downloaded version of the app (tested on OSX). Unsure if this happens in other operating systems.

There are three types of methods for page scrolling:
1. Trackpad
2. Mouse wheel
3. Up/Down arrow keys

When scrolling with one method, then switching to a different method _(specific scenarios in "**To Reproduce**" section)_, the scroll position jumps to the last scroll position for the new scroll method instead of retaining the current page scroll position of the last used method.

**To Reproduce**
Steps to reproduce the bug:
1. Start scrolling down with trackpad or mouse scroll-wheel until you're a good ways down
2. Then use Down arrow key to try to continue scrolling down (or Up to scroll up)
3. Instead of continuing scrolling from your page position, you'll jump up to the top of the page and scroll from there

It's as if the Arrow keys and Mouse wheel share a position and ignore what the Trackpad position is.

**Here's all of the tested scenarios and which ones trigger it:**
_(✅ = bug triggers)_
- ✅ Switch from Trackpad to Mouse wheel
- ✅ Switch from Trackpad to Arrow keys
- ❌ Switch from Mouse wheel to Trackpad
- ❌ Switch from Arrow keys to Trackpad
- ❌ Switch from Mouse wheel to Arrow keys
- ❌ Switch from Arrow keys to Mouse wheel

**Expected behavior**
Page scroll positions shouldn't differ depending on the scroll method used. Switching between scroll controls should continue scrolling where you left off and not jump to a different scroll vertical position of the page.

**Screenshots**
1. start page scroll position (using trackpad or mouse wheel)
Image

2. end page scroll position (using trackpad or mouse wheel)
Image

3. down arrow doesn't continue scrolling (it jumps up to scroll position of arrow keys instead of sharing scroll position across all scrolling methods)
Image

**Information about your device (please complete the following information):**
- Operating System: MacOS
- Browser: Chrome

**Additional context**
It appears that the Arrow keys and Mouse wheel share a page scroll position, and that the Trackpad is able to use that no problem, but if position changes using Trackpad, Arrow keys/Mouse wheel get's confused.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is named. First reproduce the issue in the downloaded macOS app using trackpad, mouse wheel, and arrow keys, then trace the scroll handling for those inputs; done means switching methods preserves one page position without jumps while the web version remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
desktop, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.