Commit 4c1c231
committed
fix(ios): resize single-line TextInput caret to font height
When `lineHeight > fontSize`, UITextField's default caret height
matches `paragraphStyle.maximumLineHeight`, making the cursor visibly
taller than the surrounding glyphs. Override `caretRectForPosition:`
so the caret is sized to `font.lineHeight` and centered vertically
within the full line-box instead.1 parent f87adab commit 4c1c231
1 file changed
Lines changed: 14 additions & 1 deletion
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
227 | 240 | | |
228 | 241 | | |
229 | 242 | | |
| |||
0 commit comments