fixes left click making menu hang

Currently, if you left click on the menu, the menu will just hang there and unless you right click again it won't disappear. I think it'd be better that whenever the user left clicks, the menu will just close and the already selected command will be triggered too. I added some code to do that