diff --git a/escher/src/layout_field.cpp b/escher/src/layout_field.cpp index 84570e1ad..92802363d 100644 --- a/escher/src/layout_field.cpp +++ b/escher/src/layout_field.cpp @@ -301,6 +301,8 @@ void LayoutField::reload(KDSize previousSize) { if (m_delegate && previousSize.height() != newSize.height()) { m_delegate->layoutFieldDidChangeSize(this); } + m_contentView.cursorPositionChanged(); + scrollToCursor(); markRectAsDirty(bounds()); } @@ -401,11 +403,12 @@ bool LayoutField::handleEvent(Ion::Events::Event event) { return false; } shouldRecomputeLayout = didHideLayouts || shouldRecomputeLayout; - if (shouldRecomputeLayout) { + if (!shouldRecomputeLayout) { + m_contentView.cursorPositionChanged(); + scrollToCursor(); + } else { reload(previousSize); } - m_contentView.cursorPositionChanged(); - scrollToCursor(); return true; }