Bug 435918 - Double click on "highlight with comment" annotation selects text instead of opening annotation
Summary: Double click on "highlight with comment" annotation selects text instead of o...
Status: RESOLVED DUPLICATE of bug 443882
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-19 14:55 UTC by Massimiliano L
Modified: 2024-05-23 09:55 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Massimiliano L 2021-04-19 14:55:51 UTC
SUMMARY
When in "text selection" mode, double clicking on the highlighted text of an "highlight with comment" annotation results in the word being selected instead of the annotation being opened. If the annotation spans across multiple words, clicking on the white space between will open the annotation, providing a confusing user experience (it took a while to me to realise why certain annotations did open and others did not). 

STEPS TO REPRODUCE
1. Create an "highlight with comment" annotation.
2. Switch to text selection mode.
3. Double click on the highlighted text.

OBSERVED RESULT
The double-clicked word gets selected.

EXPECTED RESULT
The annotation is opened.

SOFTWARE/OS VERSIONS 
Okular Version 20.12.3
KDE Frameworks 5.81.0
Qt 5.15.2 (built against 5.15.2)
The xcb windowing system
Comment 1 Albert Astals Cid 2021-04-22 21:59:18 UTC
You are in text selection mode, clicking doing selection things is the expected behaviour.

Why would it do something else? if you want to open the annotation you can right click or you can go to browse mode.
Comment 2 Massimiliano L 2021-04-23 08:47:24 UTC
(In reply to Albert Astals Cid from comment #1)
> You are in text selection mode, clicking doing selection things is the
> expected behaviour.
> 
> Why would it do something else? if you want to open the annotation you can
> right click or you can go to browse mode.

Hi Albert, thanks for the feedback. Maybe I should have filed it as a feature request rather than a bug.

Please note that right click in "text selection" mode does not do anything unless some text is selected, and even in that case the context menu does not have to do with annotations. So it is not possible to open the annotation that way.

I honestly think it is counterintuitive and potentially misleading for "text selection" mode to show annotations while allowing to open only some of them.

That way there is no visual/functional distinction between a simple highlight and an "highlight with comment". Furthermore, you have a situation where some "highlight with comment" open - if you click in the right place, namely a space between words where applicable - and some other do not. This feels like a lack of UX consistency to me. I truly believed Okular was broken for months until I realised by pure chance the underlying pattern, and I consider myself a fairly "advanced" user.

Also please consider the use case where one may want to copy some sentences and the related annotations on a notepad. One would need to keep switching between "text selection" and "browse mode", because in "text selection" you cannot open annotations and in "browse mode" you cannot select the document text.
Comment 3 Albert Astals Cid 2021-05-05 21:11:56 UTC
Hmmm, you're right, you can't right click.

I think adding a right click makes sense in this scenarion, but I don't want to change "double clicking selects word under cursor", because that's what anyone expects when double clicking in text selection
Comment 4 Massimiliano L 2021-05-10 21:12:27 UTC
(In reply to Albert Astals Cid from comment #3)
> Hmmm, you're right, you can't right click.
> 
> I think adding a right click makes sense in this scenarion, but I don't want
> to change "double clicking selects word under cursor", because that's what
> anyone expects when double clicking in text selection

As long as a more intuitive user experience can be provided, I am happy with whatever option is chosen.

Not sure about what "anyone expects" since I believe Okular is the only reader with differentiation between browse and text selection, but I understand the argument for consistency.
Comment 5 Felix Ernst 2024-05-23 09:55:55 UTC
The original request of this bug report ("Double click on 'highlight with comment' annotation with text selection tool should open the annotation") has been denied because while in "text selection" mode it is expected that clicking would select text rather than open annotations. I agree with this.

As a solution, Albert suggested to open the annotation while in "text selection" mode using right-click instead. I also agree with this and the bug reporter Massimiliano L also seems to be fine with this.

I will therefore mark this bug as a duplicate of https://bugs.kde.org/show_bug.cgi?id=443882 which is about right-clicking to open annotations.

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