gateway: Close the file menu when selecting a file.