Bug 471381 - Double-click text selection not possible for newly opened pages
Summary: Double-click text selection not possible for newly opened pages
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: EPub backend (show other bugs)
Version: 23.04.2
Platform: Exherbo Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-23 11:58 UTC by Bernd Steinhauser
Modified: 2023-06-23 12:06 UTC (History)
0 users

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


Attachments
Short video demonstrating the problem (1.87 MB, video/mp4)
2023-06-23 12:06 UTC, Bernd Steinhauser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Steinhauser 2023-06-23 11:58:00 UTC
SUMMARY
First thanks for providing an epub backend to Okular, it's a very welcome feature! :)

Normally, you can select a word in the text selection mode by double clicking on that word (at least for a double-click setup, I don't know how it behaves if KDE is set to single-click).
In epub files I found this to be unreliable specifically on pages on which there was no text selected before.
e.g. if I select via left-click and drag and then double click a word, the word is selected correctly. If I then proceed to the next page and try to double-click, nothing happens. I first have to make a random drag selection before I can double-click to select a word on that page.
Going back to any page on which there was something selected, it works right away.

STEPS TO REPRODUCE
1. Open an epub file (tested with multiple ones)
2. Try to select via double click
3. Select via click-drag
4. Try to select via double click again

OBSERVED RESULT
First time trying double click, nothing is selected

EXPECTED RESULT
Selecting via double click should always work

SOFTWARE/OS VERSIONS
Operating System: Exherbo 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel Version: 6.3.8-amdgpu (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
I also tried this with PDF, but there I could not reproduce the problem.
It's also a bit annoying that Okular always includes the punctuation in the word selection, which is very unusual.
But that is not specific to epub, it happens in other backends, too.
Comment 1 Bernd Steinhauser 2023-06-23 12:06:01 UTC
Created attachment 159856 [details]
Short video demonstrating the problem

Here's a short video showing this.

I start on page 200, where I selected before. double-click works fine.
I go forward to page 201 and try to double-click select, but it doesn't work.
I select some text via click-drag select and now the double-click select works as well.
Back to page 200, double-click select still works fine there.
Forward to page 201, double-click select still works fine there.
Forward to page 202 and try to double-click select, doesn't work. I select some text via click-drag and after that double-click select works fine.