code: function makeSelectionRestoreFn (activeEl, start, end) {
          return function () {
              activeEl.selectionStart = start;
              activeEl.selectionEnd = end;
          };
      }
docs: /*
  Helper function to create the function that will restore the selection.