Bug 418531 - Esc to deselect annotation tool ignored after closing an annotation popup with Esc
Summary: Esc to deselect annotation tool ignored after closing an annotation popup wit...
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.9.3
Platform: Manjaro Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-06 10:00 UTC by Simone Gaiarin
Modified: 2020-08-31 17:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gaiarin 2020-03-06 10:00:10 UTC
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.
Comment 1 Albert Astals Cid 2020-03-06 23:17:15 UTC
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?
Comment 2 postix 2020-08-31 17:54:18 UTC
Can confirm it on 1.11.0