Sometimes setSelectedRange is called without the 2nd parameter. Fixed the jsdoc and boolean checking here and did it in the same way as core.Cursor does this.