Added option to control hiding of the context menu on menu item selection