SUMMARY After closing an annotation popup with Esc the focus is not set to PageView and pressing Esc again does not disable the currently selected annotation. STEPS TO REPRODUCE 1. Double click the highlighter (continuous mode enabled) 2. Highlight some text 3. Double click the highlighted text (the annotation popup opens) 3. Click Esc (the annotation popup closes) 4. Click Esc OBSERVED RESULT The highlighter annotation tool remains active EXPECTED RESULT The highlighter annotation tool is deselected and we go back to browse mode SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.66.0 Qt Version: 5.14.1 Kernel Version: 4.19.107-1-MANJARO OS Type: 64-bit ADDITIONAL INFORMATION: After AnnotWindow::eventFilter calls close() the focus is set to a CloseButton but it is not clear to me which one and why. Here you can find a test to try this: https://invent.kde.org/gaiarin/okular/-/tree/testPopupWindowFocusProblem Run PartTest::testPopup This test is performed on the new annotation toolbar branch, but the problem applies also to Okular master.
Can you please propose a MR with that test, so we can see it failing, and then maybe someone can propose a code fix on top (or bottom) of it?
Can confirm it on 1.11.0