Fix iOS screen keyboard misplaced in the beginning

This commit is contained in:
Benau 2020-07-17 08:58:18 +08:00
parent da589263b8
commit 31c1003912

View File

@ -383,6 +383,8 @@ bool CGUIEditBox::OnEvent(const SEvent& event)
}
else if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUSED)
{
// Required for correct screen keyboard position in the beginning
FrameRect = AbsoluteRect;
m_mark_begin = m_mark_end = m_cursor_pos = getTextCount();
#ifdef ANDROID
calculateScrollPos();