Supports change selectedRange programmatically.