Fixes menu items persisting after deselection of text