fix #822 Close menus when clicking off them
Merge pull request #1158 from ScottDowne/t822

r+