Wrong widget receives focus after closing context menu
Steps to reproduce
- Run reproducer.ui with
gtk4-builder-tool preview reproducer.ui
- Right-click the text entry to open the context menu
- Close the context menu by pressing Esc, clicking anywhere outside it, or activating a menu item
Current behavior
The button next to the text entry receives focus.
Expected outcome
The text entry receives focus.
Version information
GTK 4.6.3
Fedora 36 Silverblue
Additional information
This issue affects GTK 4 only. Something to note is that the issue doesn't seem to occur with the emoji picker.