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

QScrollArea: thumb doesn't center on mouse point for small thumbs (long content) #17206

Open
thexeos opened this issue May 17, 2024 · 0 comments · May be fixed by #17207
Open

QScrollArea: thumb doesn't center on mouse point for small thumbs (long content) #17206

thexeos opened this issue May 17, 2024 · 0 comments · May be fixed by #17207
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@thexeos
Copy link
Contributor

thexeos commented May 17, 2024

What happened?

When pressing on the bar (not the thumb) of QScrollArea, the content scrolls such that middle of the thumb is positioned underneath the mouse cursor. This behavior is consistent with native scrolling (although inline [non-] scroll can behave differently).

What did you expect to happen?

It works well when there is little content inside scroll area and the thumb size is directly proportional to the size of the content. But when there is a lot of content the snapping breaks.

Reproduction URL

https://codepen.io/thexeos/pen/abrdvVL

How to reproduce?

  1. Go to reproduction link
  2. Press on scroll bar area underneath the thumb of the yellow container
  3. See how the thumb snaps to be centered on mouse pointer
  4. Now do the same with amber container
  5. Notice how the further down you click the more off-center the snapping becomes

I'll be submitting a PR shortly.

@thexeos thexeos added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels May 17, 2024
@github-actions github-actions bot added area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels May 17, 2024
thexeos added a commit to thexeos/quasar that referenced this issue May 18, 2024
thexeos added a commit to thexeos/quasar that referenced this issue May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant