Skip to content

Fix stale nested clones overwriting focused inputs on unlock - #4513

Merged
SteffenDE merged 3 commits into
mainfrom
sd-issue-4504
Nov 23, 2026
Merged

SteffenDE merged 3 commits into
mainfrom
sd-issue-4504

Conversation

@SteffenDE

Copy link
Copy Markdown
Member

When unlocking an ancestor, transfer a descendant's private clone without
morphing its stale intermediate snapshot into the live DOM. Morph the
descendant on its own unlock, preserving pending locks and handling descendants
that were already unlocked.

This prevents stale phx-patch-focused attributes from overwriting characters
typed while phx-change replies are pending, while preserving server-driven
updates to opted-in focused inputs.

Closes #4504.

When unlocking an ancestor, transfer a descendant's private clone without
morphing its stale intermediate snapshot into the live DOM. Morph the
descendant on its own unlock, preserving pending locks and handling descendants
that were already unlocked.

This prevents stale `phx-patch-focused` attributes from overwriting characters
typed while `phx-change` replies are pending, while preserving server-driven
updates to opted-in focused inputs.

Closes #4504.
@SteffenDE
SteffenDE merged commit 4755fbd into main Nov 23, 2026
18 checks passed
@SteffenDE
SteffenDE deleted the sd-issue-4504 branch November 23, 2026 16:00
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.

Focused input with phx-patch-focused loses typed chars when a phx-change reply lands mid-typing

1 participant