Skip to content

Commit 71398b6

Browse files
committed
chore: update the moveBefore changeset
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DnnXqdbCEVD67nWJbZ2Myv
1 parent 116bdc2 commit 71398b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.changeset/move-before-keeps-node-state.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@solidjs/web": patch
33
---
44

5-
The focused node keeps focus when the runtime moves it, where the browser has `Element.moveBefore()` (#3997). List reconciliation and array inserts move the node that holds `document.activeElement` with `moveBefore()`, so a focused row survives a reorder, and a move into a list that updates before the one it leaves. The reconcile's `replaceChild` path no longer detaches a row it places again later in the same pass while focus is in the list: that row waits at the end of the list's region until its turn. Every other node keeps plain `insertBefore()`, so reorders cost the same as before. Browsers without `moveBefore()` behave as before, with no focus restore, and a move into a detached parent takes `insertBefore()`.
5+
The focused node keeps focus when the runtime moves it, where the browser has `Element.moveBefore()` (#3997). List reconciliation moves the node that holds `document.activeElement` with `moveBefore()`, so a focused row survives a reorder, and a move into a list that updates before the one it leaves. While focus is in the list, the reconcile's `replaceChild` path inserts instead, leaving the old row in place until the pass places it. Focus is read once per pass, and not at all without `moveBefore()` or with focus on the body; every other node keeps plain `insertBefore()`, so reorders cost the same as before. Browsers without `moveBefore()` behave as before, with no focus restore. Array inserts into an empty slot now go through the same reconcile.

0 commit comments

Comments
 (0)