Bug 422050 - Scrolling issues with PageDown/PageUp navigation
Summary: Scrolling issues with PageDown/PageUp navigation
Status: VERIFIED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.10.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 422629 425492 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-25 13:22 UTC by mepublic+kdebugs
Modified: 2020-12-28 02:51 UTC (History)
17 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mepublic+kdebugs 2020-05-25 13:22:40 UTC
SUMMARY
The new/changed scrolling animation causes some issues with navigation inside a PDF via the usage of PageDown/PageUp.

The issues I noticed so far are:
(a) during the scroll animation further PageDown are ignored

(b) holding 'PageDown' down results in a non uniform scroll animation

(c) navigation in a PDF with PageDown/up is slow

STEPS TO REPRODUCE
(a) double tab PageDown

(b) press 'PageDown' down and keep it pressed

(c) navigate in a PDF up or down for ~2 pages

OBSERVED RESULT
(a) Page is scrolled down for the distance of one PageDown

(b) Scroll animation (of one PageDown);short stop; scroll animation; short stop; ..

(c) navigation is slow (key presses are ignored (see (a)) and scroll animation is slow)

EXPECTED RESULT
(a) Page should be scrolled down by the distance of two PageDown

(b) uniform scroll animation (i.e. no visible scrolling stop)

(c) quick navigation (no scroll animation/faster scroll animation/scroll animation which increases it speed)

SOFTWARE/OS VERSIONS
Arch 
KDE: None
Okular: 1.10.1
Comment 1 Raul Laasner 2020-05-26 17:12:38 UTC
The following fix worked for me:

diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 50f8073ec..9bdb778ec 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -5375,7 +5376,7 @@ void PageView::slotScrollUp( int nSteps )
             d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0,-100*nSteps), 0);
         }else{
             if(d->scroller->finalPosition().y() > verticalScrollBar()->minimum())
-                d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, -verticalScrollBar()->rect().height() ));
+                d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, -verticalScrollBar()->rect().height() ), 0);
         }
     }
     else if ( d->document->currentPage() > 0 )
@@ -5403,7 +5404,7 @@ void PageView::slotScrollDown( int nSteps )
             d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0,100*nSteps), 0);
         }else{
             if(d->scroller->finalPosition().y() < verticalScrollBar()->maximum())
-                d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, verticalScrollBar()->rect().height() ));
+                d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, verticalScrollBar()->rect().height() ), 0);
         }
     }
     else if ( (int)d->document->currentPage() < d->items.count() - 1 )

The second argument of scrollTo is the animation speed, which I've set to zero.
Comment 2 mepublic+kdebugs 2020-05-27 11:31:01 UTC
Thanks. I will try it over the weekend
Comment 3 Denis Lisov 2020-05-29 19:40:26 UTC
I want to add that the smooth scrolling with these limitations really ruins the experience of reading through a PDF presentation in the "fit page" mode. This is the case where I expect instant transitions because presentations sometimes contain slides where you're expected to see the difference between the two slides. Also, point (a) about missing the second press completely breaks the ability to quickly go N pages back ("let's check the phrase that was 3 slides ago").
Comment 4 johnjohnlys 2020-06-04 12:25:14 UTC
I totally agree. Please add a switch to disable this feature. I used to browse the PDF by pressing the page up/down quickly, but now I cannot do this.
Comment 5 Keziolio 2020-06-06 12:31:20 UTC
> with these limitations 

It's not a limitation of the smooth scrolling itself, I'm incredibly busy in this period and wasn't able to provide a decent fix for the other bug, those are all easy fixes but I literally don't have the time, feel free to disable all the offending stuff, I'll come back next month, sorry.
Comment 6 Laura David Hurka 2020-06-08 19:58:52 UTC
*** Bug 422629 has been marked as a duplicate of this bug. ***
Comment 7 Laura David Hurka 2020-06-15 12:21:58 UTC
> ("let's check the phrase that was 3 slides ago")
Note that Arrow Left/Right still does instant transitions.
Comment 8 Bug Janitor Service 2020-08-09 06:56:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/238
Comment 9 Harrison S 2020-09-07 07:13:14 UTC
Another vote that the "smooth" scrolling animations on PgUp/PgDn are really awful. It's unexpected and disrupts my flow, especially when I need to jump around in a document. No other program on my desktop including Dolphin, KWrite, or Gwenview has this.

Also worth noting that the pixel-wise scrolling using my touchpad is much slower in Okular than any other program, almost unusable. I wasn't able to find a relevant bug report but it seems related to the the custom scrolling behavior in Okular.

+1 to be able to toggle off all smooth scroll-related effects.
Comment 10 Raul Laasner 2020-09-07 08:57:35 UTC
Here's a another merge request that fixes the issue: https://invent.kde.org/graphics/okular/-/merge_requests/242
It's been waiting for a few weeks now.

Here's my own solution which makes kinetic scrolling optional: https://invent.kde.org/raullaasner/okular/-/commit/bb921dfbc64c691ef4575587a15a94234b197234
It's similar to the another ones so I didn't start another merge request. Just using it until the official fix comes out.
Comment 11 Laura David Hurka 2020-09-07 12:35:39 UTC
Are you sure that Dolphin has no scroll animation? Mine has. Or did you just figure out how to disable it?

I can’t say anything about the touchpad scroll speed. When I had a touchpad, Okular 19.04 had normal scroll speed with two-finger scrolling. Okular 20.08 seems to have same scroll speed as other applications with the trackpoint (psmouse driver).

I think you can come to BoF on Wednesday, where we want to discuss scrolling. See https://community.kde.org/Akademy/2020
Comment 12 Harrison S 2020-09-07 22:25:57 UTC
I'm running Debian Bullseye so my versions may be a little behind. I have Dolphin 20.04.3 and I thought there was no animation, though it may actually be there but much faster. I don't really mind it at that speed, though I would still prefer no animation. It is noticeable browsing the web in Konqueror 5.0.97.

The touchpad scroll speed may have to do with the fact that I changed the libinput Coordinate Transformation Matrix to speed up the cursor. I'll do some more testing.

Thanks for the invite to the session! I love to see a project that encourages collaboration, and I have to say I'm more satisfied overall with KDE than any other desktop since making the switch several months ago. Really an exemplar for FOSS project management. I'll see if I can make it.
Comment 13 Keziolio 2020-09-07 22:43:26 UTC
Just to remind everyone, there's already !194 that was addressing this bug two months ago, by reverting to the old behavior.

I can understand why you wouldn't want that patch given the circumstances, but really, the fix is sound, I shouldn't be still hearing people complain about this bug
Comment 14 Nate Graham 2020-09-09 17:18:08 UTC
*** Bug 425492 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2020-09-11 13:53:07 UTC
Fixed with https://invent.kde.org/graphics/okular/-/commit/e637e2ed519cb2dfe523981b2d6dc34a9855716c in Okular 1.11.2
Comment 16 Nate Graham 2020-09-15 15:53:53 UTC
*** Bug 421822 has been marked as a duplicate of this bug. ***
Comment 17 triffid.hunter 2020-09-15 15:58:56 UTC
(In reply to Nate Graham from comment #15)
> Fixed with
> https://invent.kde.org/graphics/okular/-/commit/
> e637e2ed519cb2dfe523981b2d6dc34a9855716c in Okular 1.11.2

That commit looks like it'll solve keypresses being dropped, but doesn't look like it'll affect the obnoxious smooth scrolling effect.
Comment 18 Nate Graham 2020-09-15 16:09:37 UTC
If you want to disable smooth scrolling entirely even though the slowness problem is now fixed, that's *yet another* separate issue. Currently (as of the git master version) you can do this by turning off animations globally in System Settings if you're using Plasma and just don't like any animations at all. If you're a person who does generally like some animations but just does not want animated scrolling only in Okular, then we plan to add an Okular-specific setting for that please see Bug 420755.
Comment 19 Nate Graham 2020-09-15 16:30:20 UTC
*** Bug 421822 has been marked as a duplicate of this bug. ***
Comment 20 Kamil Dudka 2020-09-15 16:41:59 UTC
(In reply to Nate Graham from comment #15)
> Fixed with
> https://invent.kde.org/graphics/okular/-/commit/
> e637e2ed519cb2dfe523981b2d6dc34a9855716c in Okular 1.11.2

I confirm that the problem goes away if the above patch is applied on okular-20.04.3.
Comment 21 Nate Graham 2020-09-15 17:21:36 UTC
Excellent.
Comment 22 Jesse 2020-09-20 22:31:46 UTC
(In reply to Nate Graham from comment #18)
> If you want to disable smooth scrolling entirely even though the slowness
> problem is now fixed, that's *yet another* separate issue. Currently (as of
> the git master version) you can do this by turning off animations globally
> in System Settings if you're using Plasma and just don't like any animations
> at all. If you're a person who does generally like some animations but just
> does not want animated scrolling only in Okular, then we plan to add an
> Okular-specific setting for that please see Bug 420755.

I would like to add my support for the Okular-specific setting to disable animated scrolling in Okular.  I don't use Plasma so I still have the animations.  Instant PgUp/PgDn navigation is ideal -- that is how I navigate in many different applications and having that impeded in Okular interrupts my workflow and is distracting.
Comment 23 Terry Barnaby 2020-12-08 17:53:38 UTC
Another person to add support to be able to disable this horrible animation. Simple and quick jump scrolling is much better for my usage and helps save the planet saving all those unnecessary CPU and graphics chip processing cycles.
Comment 24 Nate Graham 2020-12-08 18:07:41 UTC
You can disable it in Okular 20.12.
Comment 25 Terry Barnaby 2020-12-09 05:55:54 UTC
Many thanks. I will build an RPM for our Fedora33 systems.