diff options
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 9025221..b830d50 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -1277,7 +1277,11 @@ void QCoeFepInputContext::translateInputWidget() // Translation should happen row-by-row, but initially it needs to ensure that cursor is visible. const qreal translation = m_transformation.height() ? cursor.height() : (cursorRect.bottom() - vkbRect.top()); - const qreal dy = -(qMin(maxY, translation)); + qreal dy = -(qMin(maxY, translation)); + + // Correct the translation direction, if the cursor rect would be moved outside of application area. + if ((cursorRect.bottom() + dy) < 0) + dy *= -1; // Do not allow transform above screen top, nor beyond scenerect if (m_transformation.height() + dy > 0 || gv->sceneRect().bottom() + m_transformation.height() < 0) { |