public selectNodeWithoutEvent()

in src/focus.service.ts [233:255]


  public selectNodeWithoutEvent(next: HTMLElement, scrollSpeed: number | null = this.scrollSpeed) {
    if (!this.root) {
      throw new Error('root not set');
    }
    if (this.selected === next) {
      return;
    }

    this.prevElement = this.selected || undefined;

    this.triggerOnFocusHandlers(next);
    this.switchFocusClass(this.selected, next, this.focusedClass);
    this.selected = next;
    this.referenceRect = next.getBoundingClientRect();
    this.rescroll(next, scrollSpeed, this.root);

    const canceled = !next.dispatchEvent(
      new Event('arcfocuschanging', { bubbles: true, cancelable: true }),
    );
    if (!canceled) {
      next.focus({ preventScroll: true });
    }
  }