Richtext: Selection and navigation bugfixes