Focus handling for a template

It shows how the focus can be returned to the same element in a template after that template has been refreshed.