Fixed. This was actually caused by the fact that the mouse hack in the ASCII menus emitted the keypress on the mouse down event, and the graphical menus emitted the keypress on the mouse up event. So, mousedown closed the manual, and mouseup pressed the button in the main menu, which was already visible at that time. I have changed the mouse hack to also act on mouse up (and also changed the highlight to brighter while the mouse button is pressed).