docs: function getValueLengthThroughSelection(input) {
              // only do this on opera, since it'll mess up the caret position
              // and break Firefox functionality
              if (!/Opera/i.test(navigator.userAgent)) {
                return 0;
              }
  
              input.focus();
              document.execCommand("selectAll");
              var focusNode = window.getSelection().focusNode;
              return (focusNode || {}).selectionStart || 0;
            }