Emprove javascript of customization editor to stop spinner,
show alert and reshow popup when an error occurs