Fix panel hiding (intelligently) with open menus