issue #3346

Updating text-selection example to use changes made in pr #3356.