Skip to content

Conversation

@mattConnHarbour
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Jan 20, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da46d77d16

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +2008 to +2013
const pageEl = getPageElementByIndex(this.#viewportHost, pageIndex);
if (pageEl) {
pageEl.scrollIntoView({ block: 'start', inline: 'nearest', behavior: scrollBehavior });
return true;
}
return false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scroll even when target page isn't mounted

This implementation only calls scrollIntoView if getPageElementByIndex returns an element, and otherwise returns false without changing scroll. When page virtualization is enabled, off‑screen pages are often not mounted in the DOM, so getPageElementByIndex will return null even for valid pages; in that case scrollToPage cannot bring the page into view at all. This makes the new public API fail for any page outside the mounted window. Consider using the same approach as other navigation helpers (e.g., scroll to the computed y‑position and/or wait for mount) so virtualized pages can be reached.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants