Similar fix as datepicker, can click icon to close

Added `.parent()` to check one level up.