Skip to content

Fix node using itself as anchor resulting in incorrect ordering - #552

Merged
kommander merged 5 commits into
mainfrom
fix-array-revarsal-resulting-in-wrong-order
Jan 23, 2026
Merged

kommander merged 5 commits into
mainfrom
fix-array-revarsal-resulting-in-wrong-order

Conversation

@Adictya

@Adictya Adictya commented Jan 19, 2026 •

Copy link
Copy Markdown
Collaborator

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

pkg-pr-new Bot commented Jan 19, 2026 •

Copy link
Copy Markdown
@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
@kommander
kommander merged commit 506792b into main Jan 23, 2026
10 checks passed
@kommander
kommander deleted the fix-array-revarsal-resulting-in-wrong-order branch January 23, 2026 02:42
bresilla added a commit to bresilla/opentui that referenced this pull request Jan 23, 2026
* upstream/main:
  Fix node using itself as anchor resulting in incorrect ordering (anomalyco#552)
  chore(core): add Code and ScrollBox construct helpers (anomalyco#565)
  fix(react): share app context across build entrypoints (anomalyco#571)
  feat(core): add SIGPIPE, SIGBUS, SIGFPE to default exit signals (anomalyco#547)
  fix(react/solid): add missing markdown element (anomalyco#569)
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