Text unselecting when anchor dialog box is opened

Description

When text is selected and a link is added with the link button, a link is created to the left of the text. This is not a duplicate. Attempted to use this patch from Ticket #5780 with no effect. Unless using this patch with drupal is an issue.