removing an item from the selected list should be done regardless of focus, i.e. the code snippet shouldn't have been behind the "if (focus...)" condition.