dillon1000/react

Commit

Preserve scroll position when restoring focus (#8401)

This misbehavior is particularly egregious because of our current strategy for updating a container in Fiber, but regardless -- if we restore focus to an offscreen node (ex: because it was reordered among its siblings) then we should not scroll the page to reveal it.

We could check the `overflow` computed style values before saving the scroll positions but that's unlikely to be any faster.
Browse files
Changed paths1 file
First-parent comparison
M src/renderers/dom/shared/ReactInputSelection.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…