SUMMARY One common method of interacting with a scrollbar is to drag the thumb to the desired position. This is currently broken in Kate because the click needed to activate dragging behavior (triggered by click+hold of the mouse) changes the scroll position. Point-and-click scrolling should be triggered on mouseup, not mousedown, and not if there was a drag operation in between. STEPS TO REPRODUCE 1. Open a multi-page document 2. Scroll partway down. 3. Click on the scrollbar and hold down the mouse, as if you're going to drag the scrollbar thumb to scroll the document. 4. Pause and observe what happened... OBSERVED RESULT Notice that even before you drag the thumb, the page has scrolled to some random other point, depending on where in the scrollbar thumb you happened to click. EXPECTED RESULT Holding down the mouse key on the scrollbar thumb should have no effect on the scroll position. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I think this is working as designed. When the mini-map is enabled clicking the scrollbar jumps directly to the place in the document that corresponds to the place that was clicked on the scrollbar. Is there some tweaking to that behavior that you are after? I could think of not jumping immediately to the clicked place, if the clicked area is under the handle. So if you only want to move a short distance you do not have to hit exactly the right place when you press the button and can then move up/down, which might be more precise.
Yes, I think what's being requested is for it to only jump to the exact place that's clicked if the click is *outside* the scroll handle. All other scrollbars behave this way, but Kate's minimap scrollbar does not. Perhaps, if the clicked area is inside the scroll handle, it would only immediately jump to that location if the cursor is released without moving. Does that make any sense?
Yes, exactly, 100% agree with Nate's comment!
OK, I think we have an agreement on that pressing the mouse button on the scroll-handle should not jump directly to the corresponding place. I do think tho that it should not jump to that location on release either. I think it is more logical that if the handle is pressed it means that you "grab" it for moving and if you then change your mind and release it, it should not jump.
Yeah, that makes sense to me.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/485
Git commit f51556552f0d896f8f14797fe094b9a46b1e37d7 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 19/02/2023 at 16:53. Pushed by cullmann into branch 'master'. Minimap: Dont jump if click is inside the slider M +2 -1 src/view/kateviewhelpers.cpp M +1 -0 src/view/kateviewhelpers.h https://invent.kde.org/frameworks/ktexteditor/commit/f51556552f0d896f8f14797fe094b9a46b1e37d7