updated editCell so also checks e.target as well as e.target.parent