reposition or close dropdown when adding item