Set mScrollAfterUpdatePosition to true when you get the keyboard forcus. 15/192615/1
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 7 Nov 2018 04:18:30 +0000 (13:18 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Wed, 7 Nov 2018 04:18:30 +0000 (13:18 +0900)
commit8a313bb71bb0d1b443e2b5d7f383155433d385e0
treef1f2cd5921c10bff6a8bfca344a832f8af48c306
parentc3413e4097ac1e1c0a2b1c2fd2aef0ee1643c296
Set mScrollAfterUpdatePosition to true when you get the keyboard forcus.

- The cursor position is not correctly displayed when The text field is
focus out and then focus in.

[sample]
     Stage stage = Dali::Stage::GetCurrent();
     stage.SetBackgroundColor(Color::WHITE);
     stage.KeyEventSignal().Connect(this, &HelloWorldController::OnKeyEvent);

      test1 = TextField::New( );
      test1.SetProperty( TextField::Property::TEXT,"Abcdefghijklmnopqrstuvw Abcdefghijklmnopqrstuvw Abcdefghijklmnopqrstuvw" );
      test1.SetSize( 400, 50 );
      test1.SetPosition(50, 80);
      test1.SetParentOrigin(ParentOrigin::TOP_LEFT);
      test1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
      test1.SetProperty(TextField::Property::ELLIPSIS, true);
      test1.SetProperty( TextField::Property::TEXT_COLOR, Color::RED );
      stage.Add( test1 );

      test1.SetKeyboardFocusable(true);

void OnKeyEvent(const KeyEvent& event)
{
  if(event.state == KeyEvent::Down)
  {
    if(event.keyPressedName == "1") {
      KeyboardFocusManager::Get().SetCurrentFocusActor( test1 );
    }
  }
}

Change-Id: I3e83998523107f8b64cdce891fbcd17850724df8
dali-toolkit/internal/text/text-controller.cpp