constrainLength(maxLength) {
    this.update(
      Math.min(this._anchorOffset, maxLength),
      Math.min(this._focusOffset, maxLength)
    );
  }
Given a max text length, constrain our selection offsets to ensure
that the selection remains strictly within the text range.

@param {number} maxLength