A lightweight programming environment for desktop and mobile devices

UI improvement: more stable scrollbar movement

scenario: just tap somewhere on a scrollbar.

There should be no scrolling. But before this commit there would be. This made the scrollbars feel unstable.

I finally figured this out while noodling over a follow-up question to the previous commit:

Why was dragging the scrollbar down ever leaving a trail of more than just the top line's starty? In other words, why was my example:

line 1: 30
line 2: 60
line 3: 90
line 4: 30
line 5: 30
line 6: 30
...

..and not:

line 1: 30
line 2: 30
line 3: 30
line 4: 30
line 5: 30
line 6: 30
...

??

The answer: when I grab a scrollbar it always used to jump down!

Usability issues can either exacerbate bugs or make them harder to diagnose. If I'd implemented scrollbars like this from the start, we'd either never have noticed the problem of the previous commit or fixed it much more quickly.

Created by  akkartik  on December 2, 2023
EHKB76GODSP442LYG5Q4HDBA26RHWXFC4Y76ZJL2ERW3RJEBDT7QC
Change contents