From 31c1003912d75defe4ecb89244ac3e40abee7a3e Mon Sep 17 00:00:00 2001 From: Benau Date: Fri, 17 Jul 2020 08:58:18 +0800 Subject: [PATCH] Fix iOS screen keyboard misplaced in the beginning --- src/guiengine/widgets/CGUIEditBox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/guiengine/widgets/CGUIEditBox.cpp b/src/guiengine/widgets/CGUIEditBox.cpp index e66877ee6..5ca11591c 100644 --- a/src/guiengine/widgets/CGUIEditBox.cpp +++ b/src/guiengine/widgets/CGUIEditBox.cpp @@ -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();