src/js/component-owner.js
function focusWithTimeout(props, el, timeout = 0) {
  setTimeout(() => {
    if (props.stopScroll) {
      el.focus({ preventScroll: true });
    } else {
      const x = window.pageXOffset,
        y = window.pageYOffset;
      el.focus();
      window.scrollTo(x, y);
    }
  }, timeout);
}
function focusWithTimeout(props, el, timeout = 0) {
  setTimeout(() => {
    if (props.stopScroll) {
      el.focus({ preventScroll: true });
    } else {
      const x = window.pageXOffset,
        y = window.pageYOffset;
      el.focus();
      window.scrollTo(x, y);
    }
  }, timeout);
}
function focusWithTimeout ( props , el , timeout = 0 ) { setTimeout ( ( ) => { if ( props . stopScroll ) { el . focus ( { preventScroll : true } ) ; } else { const x = window . pageXOffset , y = window . pageYOffset ; el . focus ( ) ; window . scrollTo ( x , y ) ; } } , timeout ) ; }
Focus on DOM node after a delay.
@param {HTMLElement} el Element that will receive focus.
@param {Number} [timeout = 0] Delay before focus occurs, in ms. Defaults to 0.
Focus on DOM node after a delay .