Bug 438520

Summary: Okular sometimes needs two attempts to get to the next bookmark
Product: [Applications] okular Reporter: Hassan <tofailihassan>
Component: generalAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: normal CC: aacid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Bookmark tab contents

Description Hassan 2021-06-12 19:02:34 UTC
SUMMARY
Okular allows the user to create multiple bookmarks in a PDF file by right-clicking then clicking `add Bookmark` from the menu. The user can navigate between bookmarks by right-clicking and choosing `Next Bookmark` or `Previous Bookmark` from the menu. However, with some bookmarks clicking `Next Bookmark` doesn't do anything, and I'll need to right-click then click it again for Okular to move to the next bookmark.

STEPS TO REPRODUCE
1. Create multiple bookmarks in a PDF file
2. Cycle between bookmarks using right-click and `Previous/Next Bookmark`. 

OBSERVED RESULT
Sometimes two attempts are needed to get to the next bookmark. 

EXPECTED RESULT
One attempt would work.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro KDE
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2 

ADDITIONAL INFORMATION
I had thought at first that I could be dragging the PDF a little with the mouse, causing the view to move by a tiny amount from the bookmark, then `Next Bookmark` would appear not to do anything because it only reverses the tiny deviation from the bookmark. However, the problem seems to appear consistently with certain bookmarks and not others, so I do not think this is the problem.
Comment 1 Albert Astals Cid 2021-06-14 22:59:42 UTC
Are you sure you don't have two bookmarks in the same "place" so switching from one to the other does "nothing"?

Can you attach the contents of the bookmarks tab of the sidebar for that particular pdf you have issues with?
Comment 2 Hassan 2021-06-15 07:14:55 UTC
Created attachment 139331 [details]
Bookmark tab contents

Here is a screenshot showing the contents of the bookmark tab. As you can see, there is no single page with two bookmarks. I need to press Next bookmark twice to go from #122 to #131, and also twice to go from #131 to #132. 

The problem also happens with other PDF files, not only this one.
Comment 3 Albert Astals Cid 2021-06-15 21:28:19 UTC
Can you always reproduce it with that document?

If so, Is there any change we could get it?
Comment 4 Hassan 2021-06-15 22:10:30 UTC
Yes, I can reproduce it consistently. Here is a Google Drive link to download the document:
https://drive.google.com/file/d/13XiaBtWiz9iVojlqdEULh1HKejkl6Q7x/view?usp=sharing