Bug 482249 - Okular text selection glitch confuses beginning and end of selection in PDFs
Summary: Okular text selection glitch confuses beginning and end of selection in PDFs
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: qt6
: 483968 484455 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-02 20:39 UTC by Adam Fontenot
Modified: 2024-03-25 16:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.02.1


Attachments
screencast showing the issue (482.05 KB, video/webm)
2024-03-02 20:39 UTC, Adam Fontenot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2024-03-02 20:39:07 UTC
Created attachment 166317 [details]
screencast showing the issue

SUMMARY

This is Okular 24.02.0, not 24.01.95.

I realize PDFs can be fickle, but this issue is consistent across all PDFs I've tested, including some very basic ones. Copy your favorite "lorem ipsum" text into a LibreOffice Writer document, export it to PDF, and you should be able to reproduce this issue.

STEPS TO REPRODUCE
1. Start selecting some text by clicking on a line in the document, and then dragging down to select multiple lines or sentences.
2. While continuing to hold down the mouse button, drag to the left (further left than you began the selection on the top line).

OBSERVED RESULT

The *starting* point of the selection changes (is moved left).

EXPECTED RESULT

The *ending* point of the selection changes, on the final line of the selection.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Bug Janitor Service 2024-03-04 14:38:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/935
Comment 2 Albert Astals Cid 2024-03-05 21:07:14 UTC
Git commit 717751a1f1940c39f833fd0ec69fbdc4621e60db by Albert Astals Cid, on behalf of Sune Vuorela.
Committed on 05/03/2024 at 21:07.
Pushed by aacid into branch 'master'.

Fix multiline selection

In qt6, QRect::normalized changed it's meaning and it now has a 'span'
that preserves the old meaning.

Use the old span to get the old version of normalized so we can match on
the corners once again.

see https://codereview.qt-project.org/c/qt/qtbase/+/309932 for details.

M  +62   -0    autotests/parttest.cpp
M  +1    -1    part/pageview.cpp

https://invent.kde.org/graphics/okular/-/commit/717751a1f1940c39f833fd0ec69fbdc4621e60db
Comment 3 Albert Astals Cid 2024-03-05 23:01:37 UTC
Git commit 7a3af04b9e08bdedb6ce6d2e5a853c93ae5dc2ee by Albert Astals Cid, on behalf of Sune Vuorela.
Committed on 05/03/2024 at 23:01.
Pushed by aacid into branch 'release/24.02'.

Fix multiline selection

In qt6, QRect::normalized changed it's meaning and it now has a 'span'
that preserves the old meaning.

Use the old span to get the old version of normalized so we can match on
the corners once again.

see https://codereview.qt-project.org/c/qt/qtbase/+/309932 for details.
(cherry picked from commit 717751a1f1940c39f833fd0ec69fbdc4621e60db)

M  +62   -0    autotests/parttest.cpp
M  +1    -1    part/pageview.cpp

https://invent.kde.org/graphics/okular/-/commit/7a3af04b9e08bdedb6ce6d2e5a853c93ae5dc2ee
Comment 4 Sune Vuorela 2024-03-19 09:01:58 UTC
*** Bug 483968 has been marked as a duplicate of this bug. ***
Comment 5 Albert Astals Cid 2024-03-25 16:11:53 UTC
*** Bug 484455 has been marked as a duplicate of this bug. ***