PopupMenu: Allow to use the up and down arrows to wrap around
Previously, when on a last/first item in a menu, the corresponding arrow key would do nothing, e. g. you could not move, for example, from the first item to the last by pressing the up arrow. This MR fixes #6017 (closed).