Remove the menu item when on modal dialogs