Repository navigation
Conversation
Fixes microsoft#687 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 37912007-07c2-40e4-81bd-df708aa99fe2
2 tasks done
Bernardo Sunderhus (bsunderhus)
approved these changes
Nov 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous Behavior
useResizeHandlerecomputed handle attributes whenever its wrapper ref callback ran, includingsetWrapperRef(null)during React's deletion commit. In relative mode this read the resized element'sgetBoundingClientRect()and rewrote attributes on a handle that was being removed. Absolute mode still ran the value-text formatter and attribute writes.Implicated stacks during unresponsive renderer
These exact frames identify attribute work from a deletion-time ref detach, not whether relative mode or dirty layout was present, how many handles were removed, or the task's duration.
New Behavior
Keep clearing
wrapperRefon detach, but update handle attributes only when a wrapper node attaches. The attributes do not depend on the wrapper node. Attachment, reattachment, normal value updates, keyboard and drag behavior remain unchanged; no public type or dependency changes are introduced.Unit and real-browser regressions cover the detach and positive attachment/update paths. During unmount, Chromium and Firefox component fixtures measure relative-mode element reads 1 -> 0 and handle writes 4 -> 0; absolute-mode reads remain 0 and writes become 3 -> 0.
Avoiding a measurement only avoids a layout when the deletion commit had invalidated layout. This removes redundant work on a retiring handle, not a claim that every detach forced layout or that production renderer duration improved.
Related Issue(s)