Fixes text-selection example
Merge pull request #5142 from yurydelendik/fix-ts-example

Fixes text-selection example