Skip to content

Commit

Permalink
Revert D44307457: fix: make cursor center for different line height
Browse files Browse the repository at this point in the history
Differential Revision:
D44307457

Original commit changeset: afeea5605ed8

Original Phabricator Diff: D44307457

fbshipit-source-id: 71423b895fb541584a322129e05223c8af7c4886
  • Loading branch information
genkikondo authored and facebook-github-bot committed Mar 24, 2023
1 parent 8c9c8ba commit ebc97a6
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,7 @@ - (CGRect)caretRectForPosition:(UITextPosition *)position
return CGRectZero;
}

CGRect rect = [super caretRectForPosition:position];
UIFont *font = self.font;
float prevHeight = rect.size.height;
rect.size.height = font.pointSize - font.descender;
rect.origin.y += (prevHeight - rect.size.height);
return rect;
return [super caretRectForPosition:position];
}

#pragma mark - Utility Methods
Expand Down

0 comments on commit ebc97a6

Please sign in to comment.