Changed the keyup/blur behavior to handle deletion when the input is empty