facebook/react · error · Error

566

566

Error message

FragmentInstance.scrollIntoView() does not support scrollIntoViewOptions. Use the alignToTop boolean instead.

What it means

Error "FragmentInstance.scrollIntoView() does not support scrollIntoViewOptions. Use the alignToTop boolean instead." thrown in facebook/react.

Source

Thrown at packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js:3649

  resolvedAlignToTop: boolean,
): void {
  const range = textNode.ownerDocument.createRange();
  range.selectNodeContents(textNode);
  const rect = range.getBoundingClientRect();
  const scrollY = resolvedAlignToTop
    ? window.scrollY + rect.top
    : window.scrollY + rect.bottom - window.innerHeight;
  window.scrollTo(window.scrollX + rect.left, scrollY);
}

if (enableFragmentRefsScrollIntoView) {
  // $FlowFixMe[prop-missing]
  FragmentInstance.prototype.scrollIntoView = function (
    this: FragmentInstanceType,
    alignToTop?: boolean,
  ): void {
    if (typeof alignToTop === 'object') {
      throw new Error(
        'FragmentInstance.scrollIntoView() does not support ' +
          'scrollIntoViewOptions. Use the alignToTop boolean instead.',
      );
    }
    // First, get the children nodes
    const children: Array<Fiber> = [];
    traverseFragmentInstancesAndTextInstances(
      this._fragmentFiber,
      collectChildren,
      children,
    );

    const resolvedAlignToTop = alignToTop !== false;

    // If there are no children, we can use the parent and siblings to determine a position
    if (children.length === 0) {
      const hostSiblings = getFragmentInstanceOrTextInstanceSiblings(
        this._fragmentFiber,

View on GitHub (pinned to eafeac097b)

When it happens

Trigger: Thrown at packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js:3649 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of facebook/react@eafeac097b (2026-08-21). Data as JSON: /api/errors/4bd1185140cfa94f. Report an issue: GitHub.