fix: scroll field into view after window resize instead of bumping block - #10373
Open
mikeharv wants to merge 1 commit into
Open
fix: scroll field into view after window resize instead of bumping block#10373mikeharv wants to merge 1 commit into
mikeharv wants to merge 1 commit into
Conversation
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.
The basics
The details
Resolves
Fixes #10277
Proposed Changes
FieldInput.repositionForWindowResizeno longer bumps the block into the viewport. Instead, it callsscrollBoundsIntoViewso the field pans into view and the block’s workspace position is unchanged.This required adding an optional
shouldHidePopupsparam toworkspace.scroll()so to preventhideChafffrom being called.The window
resizehandler ininject.tscallssvgResizebefore dropdown/widget repositioning so there's no chance of using stale cached metrics.Reason for Changes
Bumping a block wider than the view when an input field is being edited and the window resizes (for example the mobile Android keyboard) left-aligns it to the flyout, so the focused field goes off-screen.
Testing
I validated the changes to the best of my ability using desktop Chrome. I do not have an Android device available for further testing.
I tested the need for the resize handler manually by using a
setTimeoutfunction in the console to significantly shrink the injection div then fireresize. With the original sequence, the focused field/block still end up hidden below the viewable workspace bounds:Screen.Recording.2026-08-27.at.12.40.17.PM.mov