Skip to content

Commit 6409223

Browse files
fix(iOS): image y positioning (#656)
# Summary This PR fixes image y positioning ## Test Plan 1. Insert Image into input 2. Add remove text before/after the image 3. Image should not jump ## Screenshots / Videos Before: https://github.com/user-attachments/assets/4aae93b9-ca1f-4866-88bf-b069cb507780 After: https://github.com/user-attachments/assets/0ba98088-ec4e-484a-b5d1-3a2a83e9651a ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | Android | ❌ | ## Checklist - [X] E2E tests are passing - [ ] Required E2E tests have been added (if applicable)
1 parent 96468ce commit 6409223

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ios/EnrichedTextInputView.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,6 @@ - (void)anyTextMayHaveBeenModified {
17431743
[self tryUpdatingHeight];
17441744
// update active styles as well
17451745
[self tryUpdatingActiveStyles];
1746-
[self layoutAttachments];
17471746
// update drawing - schedule debounced relayout
17481747
[self scheduleRelayoutIfNeeded];
17491748
}
@@ -1783,6 +1782,9 @@ - (void)_performRelayout {
17831782
// measureSize may not be up-to date at that point
17841783
CGSize measuredSize = [self measureSize:self->textView.frame.size.width];
17851784
self->textView.contentSize = measuredSize;
1785+
1786+
// Re-position attachment image views after the forced full re-layout
1787+
[self layoutAttachments];
17861788
});
17871789
}
17881790

0 commit comments

Comments
 (0)