adding fix for firefox switching to event.target and moving parent loop to wrap item in dom handle