Change collapseAtEnd() to collapseToEnd()