fix(input): prevent placeholder from overlapping start slot during scroll assist #30896
+37
−8
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.
Issue number: resolves internal
What is the current behavior?
On iOS, when focusing an
ion-inputorion-textareathat requires scrolling into view (scroll assist), the placeholder text shifts to the left and overlaps any content in the start slot (e.g., icons). This occurs because the cloned input used during scroll assist is positioned at the container's left edge rather than at the native input's actual position. Additionally, when quickly switching between inputs before scroll assist completes, focus jumps back to the original input.What is the new behavior?
The cloned input is now positioned at the same offset as the native input, preventing the placeholder from shifting or overlapping start slot content during scroll assist. This works correctly for both LTR and RTL layouts. Also, scroll assist no longer steals focus back if the user has moved focus to another element while scrolling was in progress.
Does this introduce a breaking change?
Other information
Current dev build: