Skip to content

Conversation

@kacperzolkiewski
Copy link
Collaborator

@kacperzolkiewski kacperzolkiewski commented Jan 9, 2026

Summary

Fixes: #332

  1. Implemented updateLayoutMetrics to correctly apply padding for _placeholderLabel constraints.
  2. Switched from boundingRectWithSize to [textView sizeThatFits:] to ensure measurement matches actual rendering logic exactly.
  3. Removed _performRelayout that caused scroll flickering.
  4. Added debounced ensureCursorIsVisible to fix cursor visibility when styles (like H1) change the text height dynamically.
  5. Fix position of lists markers

Test Plan

  1. Run example code from Padding seems to be applied as margin #332 and check if the padding is not applied as margin.
  2. Run example app and play with different styles - check If height of the view is correct

Screenshots / Videos

Before:

Screen.Recording.2026-01-09.at.13.22.58.mov

After:

Screen.Recording.2026-01-09.at.13.20.35.mov

Compatibility

OS Implemented
iOS
Android

@kacperzolkiewski kacperzolkiewski marked this pull request as ready for review January 9, 2026 12:42
@kacperzolkiewski kacperzolkiewski requested review from exploIF and szydlovsky and removed request for szydlovsky January 9, 2026 12:42
@IvanIhnatsiuk
Copy link
Contributor

IvanIhnatsiuk commented Jan 9, 2026

In general, this fix is pretty much the same as what I did in #339

@kacperzolkiewski , @szydlovsky

Can we proceed with my PR instead, since this one won't react to the screen rotation and dynamic size changes + it will calculate size when width and height are not actually changed?

A small example:

" - indicates text view bounds
| - caret position

"Some text | "

If I type a text in the caret position, it won't produce a new line, it won't increase the text view width(if we set it as a static value), and there is no sense in recalculating width and height for the shadow node.

@kacperzolkiewski
Copy link
Collaborator Author

Hi @IvanIhnatsiuk,
@exploIF will look at your PR within few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Padding seems to be applied as margin

3 participants