Bug 421437 - cursor is still a pointing hand when scrolling stops after clicking an internal link
Summary: cursor is still a pointing hand when scrolling stops after clicking an intern...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 20.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-12 22:44 UTC by Albert Astals Cid
Modified: 2020-10-21 00:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.11.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2020-05-12 22:44:35 UTC
STEPS TO REPRODUCE
1. Open a file with internal links, e.g. https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf 
2. Click on an internal link, e.g. Preface on Page 3, and do not move the mouse
3. Wait for scrolling to end
4. See how cursor is still a pointing hand

EXPECTED RESULT
The cursor is not the pointing hand since there's no link on the destination

ADDITIONAL INFORMATION

This works on the release/19.12 branch
Comment 1 Albert Astals Cid 2020-05-12 22:45:06 UTC
Seems like another regression of the QScroller patch, please have a look
Comment 2 Oliver Sander 2020-05-27 07:04:00 UTC
I did some initial investigations at https://invent.kde.org/graphics/okular/-/merge_requests/176.
Comment 3 Nate Graham 2020-10-13 19:15:55 UTC
Git commit da934a0a0aad36e03c6c313a67ef30afabec58a3 by Nate Graham, on behalf of Oliver Sander.
Committed on 13/10/2020 at 18:35.
Pushed by ngraham into branch 'master'.

Make cursor open hand again after clicking on internal link

M  +7    -0    autotests/parttest.cpp

https://invent.kde.org/graphics/okular/commit/da934a0a0aad36e03c6c313a67ef30afabec58a3
Comment 4 Bug Janitor Service 2020-10-20 17:32:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/297
Comment 5 Nate Graham 2020-10-21 00:40:06 UTC
Git commit 8b008b02fc31e20f7c74ab2c25d34160756c7a92 by Nate Graham, on behalf of David Hurka.
Committed on 21/10/2020 at 00:40.
Pushed by ngraham into branch 'release/20.08'.

Fix cursor not updated after clicking internal link

updateCursor() was called by wheelEvent(), which made sense,
because after the wheel event the page will have moved under the cursor.

With smooth scrolling, it makes less sense in wheelEvent(),
because at that point scrolling is still in the future.

scrollContentsBy() appears to be called on every scroll step.
(It is documented to be called at scrollbar value changes, so makes sense.)

This patch removes updateCursor() from wheelEvent(), but adds it to scrollContentsBy().

I did not check anything out with d->visibleItems, as was indicated it graphics/okular!176.

M  +5    -2    ui/pageview.cpp

https://invent.kde.org/graphics/okular/commit/8b008b02fc31e20f7c74ab2c25d34160756c7a92
Comment 6 Nate Graham 2020-10-21 00:53:02 UTC
Git commit 843c43cc6ba82a80db86e0a5ed11e27e255cd851 by Nate Graham, on behalf of David Hurka.
Committed on 21/10/2020 at 00:52.
Pushed by ngraham into branch 'master'.

Fix cursor not updated after clicking internal link

updateCursor() was called by wheelEvent(), which made sense,
because after the wheel event the page will have moved under the cursor.

With smooth scrolling, it makes less sense in wheelEvent(),
because at that point scrolling is still in the future.

scrollContentsBy() appears to be called on every scroll step.
(It is documented to be called at scrollbar value changes, so makes sense.)

This patch removes updateCursor() from wheelEvent(), but adds it to scrollContentsBy().

I did not check anything out with d->visibleItems, as was indicated it graphics/okular!176.

M  +0    -4    autotests/parttest.cpp
M  +5    -2    ui/pageview.cpp

https://invent.kde.org/graphics/okular/commit/843c43cc6ba82a80db86e0a5ed11e27e255cd851