diff --git a/submodules/AsyncDisplayKit/Source/ASEditableTextNode.mm b/submodules/AsyncDisplayKit/Source/ASEditableTextNode.mm index e8e7547d26..277af0f9c8 100644 --- a/submodules/AsyncDisplayKit/Source/ASEditableTextNode.mm +++ b/submodules/AsyncDisplayKit/Source/ASEditableTextNode.mm @@ -446,7 +446,7 @@ textSize = [displayedComponents sizeForConstrainedWidth:constrainedSize.width]; } - CGFloat width = std::ceil(textSize.width + _textContainerInset.left + _textContainerInset.right); + CGFloat width = std::ceil(constrainedSize.width); CGFloat height = std::ceil(textSize.height + _textContainerInset.top + _textContainerInset.bottom); return CGSizeMake(std::fmin(width, constrainedSize.width), std::fmin(height, constrainedSize.height)); } diff --git a/submodules/AsyncDisplayKit/Source/TextKit/ASTextKitComponents.mm b/submodules/AsyncDisplayKit/Source/TextKit/ASTextKitComponents.mm index 598c4398ec..eeff17607d 100644 --- a/submodules/AsyncDisplayKit/Source/TextKit/ASTextKitComponents.mm +++ b/submodules/AsyncDisplayKit/Source/TextKit/ASTextKitComponents.mm @@ -129,7 +129,7 @@ // If our text-view's width is already the constrained width, we can use our existing TextKit stack for this sizing calculation. // Otherwise, we create a temporary stack to size for `constrainedWidth`. - /*if (CGRectGetWidth(components.textView.threadSafeBounds) != constrainedWidth)*/ { + if (CGRectGetWidth(components.textView.threadSafeBounds) != constrainedWidth) { components = [ASTextKitComponents componentsWithAttributedSeedString:components.textStorage textContainerSize:CGSizeMake(constrainedWidth, CGFLOAT_MAX)]; }