This tests onSelect for textareas.
This also makes sure that the correct selection is restored when the element regains focus.