When a text controller has focus and loses keyboard focus,
the controller is in the INACTIVE state.
But in this case, when the cursor position is updated from a key event,
there is an issue that the position is not updated due to the wrong state.
This patch changes the state of controller to EDITING in the issue case.
Change-Id: Idea21a5486a7c076a59ad5dcd74c5b3343c1e2fe
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
const Size size( application.GetScene().GetSize() );
controller->Relayout(size);
+ // For coverage
+ controller->KeyEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Dali::KeyEvent::DOWN ) );
+
tet_result(TET_PASS);
END_TEST;
return false;
}
+ if(controller.mImpl->mEventData->mState == EventData::INACTIVE)
+ {
+ // Cursor position will be updated
+ controller.mImpl->ChangeState(EventData::EDITING);
+ }
+
controller.mImpl->mEventData->mCheckScrollAmount = true;
Event event(Event::CURSOR_KEY_EVENT);
event.p1.mInt = keyCode;