Bug 432121 - fast scrolling on page number glitches/does not scroll at all
Summary: fast scrolling on page number glitches/does not scroll at all
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 20.12.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-01-25 21:09 UTC by Bernhard
Modified: 2023-10-16 12:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard 2021-01-25 21:09:51 UTC
SUMMARY
Fast scrolling on the page-number input box causes okular to lose most of the events/scroll erratically. This is especially bad with mice that support 'infinite scrolling' (removes resistance that stops the wheel after being spun)
I am pretty sure this has worked perfectly fine in the past.

STEPS TO REPRODUCE
1. Open .pdf with many pages
2. Scroll very fast

OBSERVED RESULT
The page number jumps around while okular doesn't actually scroll more than a couple of pages.
It looks very much like the page number is rapidly reset to the currently visible page from the slowly scrolling document.

I also tested with a high-res scrolling touchpad on current master and it is even worse there, often it can't even leave the first page.

EXPECTED RESULT
Okular should not miss/ignore input events and scroll one page per discrete (ie. not high-resolution) scroll event. For high-res scrolling I don't know what exactly the solution would be. 

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.20.5 on X11
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.10-arch1-1

AND

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.21.80 on Wayland
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-rc5-generic
OS Type: 64-bit
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15,1 GiB of RAM
Graphics Processor: AMD RENOIR
Comment 1 Albert Astals Cid 2021-01-25 22:07:29 UTC
Probably caused by the smooth scrolling patches "oh no i can't scroll to that new page because i'm already scrolling".
Comment 2 Nate Graham 2021-01-25 23:54:28 UTC
Ah yup, can reproduce. That's probably the reason indeed.
Comment 3 Laura David Hurka 2021-01-26 12:01:57 UTC
You can check that by unchecking “use smooth scrolling” in the config dialog. It’s now the first checkbox in that dialog.

The problem is probably that PageView reports “viewport changed” at every scroll step (60Hz), and then the DocumentObserver mechanism reports the new viewport to the page number widget. (Similar to how the viewport is reported to the thumbnails bar.) I. e. exactly this:

> It looks very much like the page number is rapidly reset to the
> currently visible page from the slowly scrolling document.
Comment 4 Bernhard 2023-10-16 12:30:05 UTC
I just want to throw in that that the problem still exists, and is much worse with most modern high-res touchpads (which support pixel scrolling), because it's almost impossible to "scroll slowly".

Touchpads continuously generates scrolling events, they should instead be accumulated until a full "line" has been scrolled instead of trying to scroll a full page for each pixel scrolled