Fix text input scrolling when the controll is too small. 84/26584/1
authorFrancisco Santos <f1.santos@samsung.com>
Tue, 26 Aug 2014 14:12:58 +0000 (15:12 +0100)
committerFrancisco Santos <f1.santos@samsung.com>
Tue, 26 Aug 2014 14:12:58 +0000 (15:12 +0100)
Change-Id: Ie18f3cfdc42a4d2059a3fa8948eaf9f3cf79d904

base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp

index 7a0729c..44c5aaf 100644 (file)
@@ -1951,11 +1951,7 @@ void TextInput::ScrollTextViewToMakeCursorVisible( const Vector3& cursorPosition
     scrollOffset.x += cursorPosition.x;
   }
 
-  if( cursorPosition.y - cursorSize.height < 0.f )
-  {
-    scrollOffset.y += ( cursorPosition.y - cursorSize.height );
-  }
-  else if( cursorPosition.y > controlSize.height )
+  if( cursorPosition.y - cursorSize.height < 0.f || cursorPosition.y > controlSize.height )
   {
     scrollOffset.y += cursorPosition.y;
   }