Fix text selection on resize. Fixes #6