Skip to content

Auto-scroll when holding mouse down on scrollbar track #869

@LuckerCracker

Description

@LuckerCracker

Description

Scrollbar interaction behaves incorrectly when clicking on the scrollbar track (background), not the thumb.
In the basic demo sample, when clicking and holding the left mouse button on the scrollbar track, the content scrolls only once and then stops.
In a correct implementation, holding the mouse button on the scrollbar track should continuously auto-scroll in steps toward the position of the cursor until it reaches it or the button is released.

Currently, to scroll further, the user must release and press the mouse button repeatedly.

Steps to reproduce

  1. Open the basic demo sample: https://github.com/mikke89/RmlUi/tree/master/Samples/basic/demo
  2. Run the demo
  3. Find any scrollable element with a vertical scrollbar
  4. Click on the scrollbar track (empty area, not the thumb)
  5. Hold the left mouse button

Expected behavior

  • While holding the mouse button on the scrollbar track:
  • The content should auto-scroll repeatedly in steps
  • Scrolling should continue until:
    • the scroll position reaches the cursor location, or
    • the mouse button is released

Actual behavior

  • Content scrolls only once
  • Auto-scrolling stops immediately
  • To continue scrolling, the user must:
    • release the mouse button
    • click again on the scrollbar track

Environment

  • RmlUi version: master
  • Sample: Samples/basic/demo
  • OS: Windows 11 x64
  • Input device: mouse

Additional notes
This feels like the scrollbar track click handler triggers a single scroll step, but does not start a repeated auto-scroll while the mouse button remains pressed.

Video showing incorrect operation: https://youtu.be/vF16bsbrx-s
Video showing correct operation: https://youtu.be/qzpHWCbkrlU

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions