final Range first = getFirstRange();
if (first != null) {
final List<Range> ranges = getRanges();
ranges.clear();
ranges.add(first);
first.collapse(true);
}
}
/**
* Cancels the current selection, sets the selection type to none, and sets the item property to null (IE only).