bluesky-social / bluesky-social/react-native-uitextview

Long text creates margin at the bottom of the text

Open
#6 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
418
Forks
44
Avg merge
2d 57m
Merged PRs (30d)
4

Description

When you have a large amount of text inside the component you will eventually get some margin at the bottom of the text view. The longer you make the text the more margin will be there. The margin seems to get added in increments of the line height as you make the text longer.

If you take 30 paragraphs of [Lorem Ipsum](https://www.lipsum.com) you will see one extra line:
Screenshot 2024-04-05 at 11 06 43
The red background is set on the `UITextView`.

If you add another 30 paragraphs you will get another extra empty line:
Screenshot 2024-04-05 at 11 07 45

My guess is that it would have to do with some small error in the view height calculation that adds up over time as the size of the text grows. But I have not looked at the code much so I don't know exactly.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with 30 and then 60 Lorem Ipsum paragraphs, using the red UITextView background shown in the report. Trace the component's text and height calculation, then verify that increasing the text length no longer adds empty lines or bottom margin.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.