You're right, this is much simpler. I've removed the "isBackwards" though and set the second setRange parameter to false, so that the cursor is always at the bottom of the selection.