-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
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.
logseq/src/main/frontend/extensions/pdf/core.cljs
Lines 416 to 418 in 99a38de
(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