emacs-eaf / emacs-eaf/emacs-application-framework
eaf-pdf-viewer: switching to other frame when press any key in tear-off-window frame
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 245
- Avg merge
- 22h 20m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
eaf-pdf-viewer handles key press signal incorrectly in tear-off-window frame
**To Reproduce**
1. open emacs with only eaf loaded
> emacs -q -l init-eaf.el
2. load eaf-pdf-viewer module:
> (require 'eaf)
> (require 'eaf-pdf-viewer)
3. create a new frame using tear-off-window
> M-x dired-jump-other-window
> M-x tear-off-window
4. open a pdf file using eaf-pdf-viewer in new window (the one that teared off)
> M-x eaf-open; open minif.pdf
5. scroll the pdf view using hjkl keys. It is normal at first.
6. switch to other emacs frame (or other GUI window) and then switch back
7. scroll the pdf view again using hjkl keys: now any key press will turn you back to other emacs frame automatically, meanwhile the mouse scroll behave normally.
**Expected behavior**
pressing hjkl keys in eaf-pdf-viewer buffer should scroll the view, but not switch to other emacs frame
**Versions (please complete the following info):**
- Distro and DE/WM: KDE
- Versions of Dependencies:
- M-x emacs-version: 28.2
**Error logs**
Please check the `*eaf*` buffer, if there is any error in it, paste it here.
**Screenshots**
the eaf I used:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.