float newScrollValue = 0.0f;
float tokenTopMargin = 0.0f;
float tokenBottomMargin = 0.0f;
+ float tokenHeight = 0.0f;
+ float textBoundsAlignValue = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
_AccessibilityElement* pAccessibilityElement = null;
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
FloatRectangle tokenEditRect = __pTokenEdit->GetBoundsF();
+ float textObjectMaxHeight = GetMaxTextHeight();
+ textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f;
pAccessibilityElement = const_cast< _AccessibilityElement* >(&element);
r = __accessibilityElements.IndexOf(pAccessibilityElement, focusedTokenIndex);
}
else
{
- newScrollValue = focusedTokenPosition - tokenEditRect.height + tokenBottomMargin - __scrollValue;
+ newScrollValue = focusedTokenPosition - textBoundsAlignValue - tokenEditRect.height + tokenBottomMargin - __scrollValue;
}
r = RecalculateTokenBounds(newScrollValue);