Skip to content

Conversation

@Adictya
Copy link
Collaborator

@Adictya Adictya commented Jan 19, 2026

Fixes an edge case where if the node itself is provided to insertBefore as anchor as well, the node gets inserted at the wrong index.

Issue got noticed in a testcase of reversing an array in solid and trigerring a re-render which didn't result in the correct item order.

Tests included at both core and solid level

Also makes non existing anchor a non fatal error.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

@opentui/core

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core@552

@opentui/react

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/react@552

@opentui/solid

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/solid@552

@opentui/core-darwin-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-arm64@552

@opentui/core-darwin-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-x64@552

@opentui/core-linux-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-arm64@552

@opentui/core-linux-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-x64@552

@opentui/core-win32-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-arm64@552

@opentui/core-win32-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-x64@552

commit: f532c70

@Adictya Adictya changed the title Fix using node as anchor resulting in incorrect ordering Fix node itself as anchor resulting in incorrect ordering Jan 19, 2026
@Adictya Adictya changed the title Fix node itself as anchor resulting in incorrect ordering Fix node using itself as anchor resulting in incorrect ordering Jan 19, 2026
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.

3 participants