Add triggering guard around tooltip select event

Otherwise we will unintentially trigger prepareFormat or formatText
Fix html comparison to ignore attribute ordering