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

Scrollbar jumps in settings when clicking a button after scrolling way down #15882

Open
grorp opened this issue Mar 8, 2025 · 1 comment
Open
Labels
Bug Issues that were confirmed to be a bug @ Mainmenu Regression Something that used to work no longer does UI/UX
Milestone

Comments

@grorp
Copy link
Member

grorp commented Mar 8, 2025

Luanti version

Luanti 5.12.0-dev-18ac8b20f (Linux)
Using LuaJIT 2.1.1703358377
Built by GCC 13.3
Running on Linux/6.8.0 x86_64
BUILD_TYPE=RelWithDebInfo
RUN_IN_PLACE=1
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="."
STATIC_LOCALEDIR="locale"

Operating system and version

Ubuntu 24.04.2 LTS apparently???

Summary

The scrollbar in the settings menu jumps when clicking a "Set" button in the "Advanced" -> "Advanced" section after scrolling way down.

scrollbar.jump.mp4

This is a regression from #14623 / 13f533d: fixed if I revert that commit (revert still applies cleanly on latest "master" branch as of today :o)

(I noticed this a while ago but didn't get around to opening an issue until now)

CC @SmallJoker

Steps to reproduce

  1. go to settings
  2. check "show advanced" checkbox
  3. go to "Advanced" -> "Advanced" category
  4. scroll way down
  5. press "Set" on any setting
  6. observe the scrollbar jumping
@grorp grorp added Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible @ Mainmenu Regression Something that used to work no longer does UI/UX labels Mar 8, 2025
@grorp grorp added this to the 5.12.0 milestone Mar 8, 2025
@Desour Desour added Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Mar 8, 2025
@Desour
Copy link
Member

Desour commented Mar 8, 2025

I guess what is happening here is that the default scroll value from the scrollbar[] element is clamped, and the maximum is updated later (i.e. >1000), after parsing the elements.

A simple fix for just this case would be to make the max value larger via scrollbaroptions, just so that the value isn't clamped.

Should we maybe store the default scroll value when parsing scrollbars, and set it later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Mainmenu Regression Something that used to work no longer does UI/UX
Projects
None yet
Development

No branches or pull requests

2 participants