select the item before opening the contextual menu