diff --git a/components/TextFields/src/MDCTextField.m b/components/TextFields/src/MDCTextField.m index 478295894d6..a01d45d79ec 100644 --- a/components/TextFields/src/MDCTextField.m +++ b/components/TextFields/src/MDCTextField.m @@ -40,6 +40,7 @@ // by this amount on each side. static const CGFloat MDCTextInputClearButtonImageBuiltInPadding = -2.5f; static const CGFloat MDCTextInputEditingRectRightViewPaddingCorrection = -2.f; +static const CGFloat MDCTextInputTextRectYCorrection = 1.f; @interface MDCTextField () { UIColor *_cursorColor; @@ -522,7 +523,7 @@ - (CGRect)textRectForBounds:(CGRect)bounds { (CGRectGetHeight(bounds) / 2.f) - MDCRint(MAX(self.font.lineHeight, self.placeholderLabel.font.lineHeight) / 2.f); // Text field or placeholder - actualY = textInsets.top - actualY; + actualY = textInsets.top - actualY + MDCTextInputTextRectYCorrection; textRect.origin.y = actualY; if (self.mdf_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {