diff --git a/YYText/YYTextView.m b/YYText/YYTextView.m index 1dbad5d3..3c3d6e31 100644 --- a/YYText/YYTextView.m +++ b/YYText/YYTextView.m @@ -2421,7 +2421,7 @@ - (void)setFrame:(CGRect)frame { CGSize oldSize = self.bounds.size; [super setFrame:frame]; CGSize newSize = self.bounds.size; - BOOL changed = _innerContainer.isVerticalForm ? (oldSize.height != newSize.height) : (oldSize.width != newSize.width); + BOOL changed = _innerContainer.isVerticalForm ? CGSizeEqualToSize(oldSize, newSize) : (oldSize.width != newSize.width); if (changed) { [self _updateInnerContainerSize]; [self _commitUpdate];