FIX: selection going missing in Safari (PR #14557)

We need to do this after setting focus() to an element, otherwise Safari loses the visual effect of the selection.

GitHub