Simplify text-selection example.
Merge pull request #5143 from yurydelendik/fix-ts-example

Simplify text-selection example.