Bug 427903 - Back-forward navigation broken when a we follow an internal PDF link by clicking it
Summary: Back-forward navigation broken when a we follow an internal PDF link by click...
Status: RESOLVED DUPLICATE of bug 414701
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.2
Platform: Arch Linux Other
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-18 05:18 UTC by Kishore Gopalakrishnan
Modified: 2020-11-23 21:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2020-10-18 05:18:40 UTC
SUMMARY
With the latest version of okular (1.11.2), the page number in the toolbar updates during a scroll action (this wasn't the case earlier). This change seems to have broken back-forward navigation. If I follow an internal link in a PDF, and then press Go>Back, the PDF just scrolls slightly up (to the last view visible during the scroll action) and not to the page containing the link I clicked.

STEPS TO REPRODUCE
1. Open a PDF which contains an internal link.
2. Click a link that takes you to a (far away) page.
3. Once the scroll action is finished, click 'Go > Back'.

OBSERVED RESULT
Okular scrolls just one 'view region' up/down, instead of scrolling to the place where the clicked link was.

EXPECTED RESULT
On pressing 'back', Okular should scroll to the page containing the clicked link.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
With this version (1.11.2), okular started updating the page number shown in the 'page number' toolbar during a scroll action (earlier, it would update only after finishing the scroll action). I guess this somehow messes up okular's history. Downgrading to okular 1.11.1 fixes the issue.
Comment 1 Oliver Sander 2020-10-18 06:09:56 UTC
I cannot confirm this with Okular from git master.  Does this happen on all files and link types?
Comment 2 Kishore Gopalakrishnan 2020-10-18 06:45:42 UTC
(In reply to Oliver Sander from comment #1)
> I cannot confirm this with Okular from git master.  Does this happen on all
> files and link types?

It happens with multiple PDFs for me (for example, the PDF available at https://arxiv.org/abs/2009.09344). In the aforementioned PDF, if I click on one of the citations on the first page, it takes me to the list of citations on the last page. Clicking 'back' after this doesn't take me to the link I clicked, but instead moves the scrollview area up by one 'view area' (i.e. whatever was previously visible during the scroll animation).

Running a git bisect shows that the bug was introduced with https://invent.kde.org/graphics/okular/-/commit/bdb2df773d774c15cf0a17fcae198d3f2452cdfa
Comment 3 Kishore Gopalakrishnan 2020-10-18 06:55:05 UTC
I just noticed that the bug also gets triggered when you use the 'go to page' option, and then press back.
Comment 4 Kishore Gopalakrishnan 2020-10-18 08:14:03 UTC
I can only reproduce this with smooth-scrolling enabled (in Okular's settings).
Comment 5 Oliver Sander 2020-10-18 08:22:56 UTC
Okay, with smooth scrolling enabled I can reproduce it.
Comment 6 Albert Astals Cid 2020-10-18 18:01:29 UTC

*** This bug has been marked as a duplicate of bug 414701 ***