fix wrong behaviour of SelectWholeText()
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller-impl-event-handler.cpp
index 22525db..c9a197f 100644 (file)
@@ -124,7 +124,7 @@ bool ControllerImplEventHandler::ProcessInputEvents(Controller::Impl& impl)
 
     if(nullptr != impl.mEditableControlInterface)
     {
-      impl.mEditableControlInterface->CaretMoved(eventData->mPrimaryCursorPosition);
+      impl.mEditableControlInterface->CursorMoved(eventData->mPrimaryCursorPosition);
     }
 
     if(eventData->mUpdateCursorHookPosition)
@@ -155,7 +155,10 @@ bool ControllerImplEventHandler::ProcessInputEvents(Controller::Impl& impl)
     eventData->mUpdateCursorPosition     = false;
     eventData->mUpdateGrabHandlePosition = false;
   }
-  else
+
+  if(eventData->mUpdateHighlightBox ||
+     eventData->mUpdateLeftSelectionPosition ||
+     eventData->mUpdateRightSelectionPosition)
   {
     CursorInfo leftHandleInfo;
     CursorInfo rightHandleInfo;
@@ -655,7 +658,7 @@ void ControllerImplEventHandler::OnSelectAllEvent(Controller::Impl& impl)
   if(impl.mEventData)
   {
     EventData& eventData = *impl.mEventData;
-    if(eventData.mSelectionEnabled)
+    if(eventData.mSelectionEnabled && eventData.mState != EventData::INACTIVE)
     {
       ModelPtr&      model          = impl.mModel;
       const Vector2& scrollPosition = model->mScrollPosition;