Skip to content

[ubuntu] PDF area highlight can't be invoked by shift+mouse  #10397

@e-zz

Description

@e-zz

Search first

  • I searched and no similar issues were found

What Happened?

PDF area highlight can't be invoked by shift+mouse.
Instead, text under cursor is selected.

Reproduce the Bug

Open any PDF and then hold shift and move the mouse with right click

Desktop or Mobile Platform Information

ubuntu 22.04
Logseq 0.9.19 (appimage)

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

UPDATE:
Finally I found the lines that handle "shift+mouse" on PDF.

(and e (or (.-metaKey e)
(and util/win32? (.-shiftKey e))
@*area-mode?)))))

So to understand what happened, I traced the file history. The commit added this util/win32? in commit #2598 in this specific line here

I am a bit confused. The commit message didn't mention any problems that would justify the additional check. Perhaps we can skip checking the platform? Furthermore, on other platforms, we should consider allowing specific modifier keys as the trigger for area highlighting, unless there is a valid reason not to do so

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions