added Yael's work on focusEvents for textfields
added text regeneration on lost focus