Navigation in popover with Tab key cycles through non popover's child widget too
Steps to reproduce
- Open the GTK4 demo "Application Class", and its inspector (not the main window one, just the demo window, as they are in separate process/Applications).
- Enable the focus indicator settings under Global > Settings, at the end of the second section in the inspector. Now you should be seeing a magenta-like transparent overlay on the focused widget.
- Open the Help menu bar item (e.g. Alt+H)
- Press Tab repetitively
Current behavior
You can see that the focus first is on the About menu item, then it cycles through the three main window's button and the text area, but it doesn't go back to the first menu item. So there's (maybe?) two bugs, one where it starts focusing widgets that are not in the popover, and one where the focus doesn't come back to the menu. This first bug happens too with the popover menu accessible with the first button (with a folder icon), but the later bug doesn't happen: the focus does come back to the popover menu.
Expected outcome
Widgets that aren't in the popover (i.e. childs of the popover) shouldn't be receiving the focus. Also, a menu from a menu bar (I don't know how the popover menu and the menubar's one differ actually) should get back the focus once it cycled through all its menu items.
Version information
Fedora 34, GNOME 40. GTK4 Demo from gnome-nightly flatpak.
Additional information
This screenshot shouldn't be possible to obtain.