Bug 484011

Summary: Document loses keyboard focus after adding a pop-up note
Product: [Applications] okular Reporter: Adam Fontenot <adam.m.fontenot+kde>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 24.02.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Adam Fontenot 2024-03-19 17:57:11 UTC
SUMMARY

This prevents you from (a) navigating the document using the keyboard, e.g. with the arrow keys, and (b) switching tools using the numbered shortcuts, e.g. switching back to the highlight tool.

STEPS TO REPRODUCE
1. Make a trivial PDF document. I exported a few paragraphs of Lorem Ipsum from LibreOffice to a PDF. Open in Okular.
2. Press 6 to switch your tool to the pop-up note.
3. Click in the document to add a pop-up note, and add a word or two to the note. Click the little X button on the note with your cursor.
4. Try to navigate the document with the arrow keys. Try to switch tools by pressing 1 (highlighter).
5. Click on the window chrome, e.g. in an empty part of the toolbar underneath the menu bar. Try keyboard navigation again.
6. Click somewhere in the document area. This may require you to resize the document so that you can click in a place that won't add another pop-up note. Now try keyboard navigation again.

OBSERVED RESULT

Okular does not respond to keyboard input until after refocusing the document viewing widget in step 6.

EXPECTED RESULT

Okular responds to keyboard input in step 4. Steps 5/6 are not applicable.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: Wayland