From e55037354c0b65a02adb5981052bb59937e19775 Mon Sep 17 00:00:00 2001 From: Vadim Spivak Date: Thu, 16 Jun 2016 21:59:29 -0700 Subject: [PATCH] Round up editable text node to the next point (#1761) Rounding up to the next device pixel was calculating a height smaller than UITextView's contentSize. This was causing the baseline to move as the user was typing. --- AsyncDisplayKit/ASEditableTextNode.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASEditableTextNode.mm b/AsyncDisplayKit/ASEditableTextNode.mm index eb00be79..48035a8d 100644 --- a/AsyncDisplayKit/ASEditableTextNode.mm +++ b/AsyncDisplayKit/ASEditableTextNode.mm @@ -192,8 +192,7 @@ { ASTextKitComponents *displayedComponents = [self isDisplayingPlaceholder] ? _placeholderTextKitComponents : _textKitComponents; CGSize textSize = [displayedComponents sizeForConstrainedWidth:constrainedSize.width]; - textSize = ceilSizeValue(textSize); - return CGSizeMake(fminf(textSize.width, constrainedSize.width), fminf(textSize.height, constrainedSize.height)); + return CGSizeMake(fminf(ceilf(textSize.width), constrainedSize.width), fminf(ceilf(textSize.height), constrainedSize.height)); } - (void)layout