Fix for the highlight box. 98/116698/2
authorVictor Cebollada <v.cebollada@samsung.com>
Mon, 27 Feb 2017 17:02:47 +0000 (17:02 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Tue, 28 Feb 2017 10:09:47 +0000 (02:09 -0800)
* The highlight box is not created when the text edited
  is in the pre-edit state and the user does a long press
  on top of the pre-edited word.
  The issue is fixed reseting the update-cursor flag to
  false.

Change-Id: I8100504bfeb6894ddfc99a9768e6492e076fd648
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
dali-toolkit/internal/text/text-controller-impl.cpp

index 3a44c2f..e250542 100644 (file)
@@ -2198,6 +2198,12 @@ void Controller::Impl::RepositionSelectionHandles( float visualX, float visualY
     mEventData->mUpdateRightSelectionPosition = true;
     mEventData->mUpdateHighlightBox = true;
 
     mEventData->mUpdateRightSelectionPosition = true;
     mEventData->mUpdateHighlightBox = true;
 
+    // It may happen an IMF commit event arrives before the selection event
+    // if the IMF manager is in pre-edit state. The commit event will set the
+    // mEventData->mUpdateCursorPosition flag to true. If it's not set back
+    // to false, the highlight box won't be updated.
+    mEventData->mUpdateCursorPosition = false;
+
     mEventData->mScrollAfterUpdatePosition = ( mEventData->mLeftSelectionPosition != mEventData->mRightSelectionPosition );
   }
   else
     mEventData->mScrollAfterUpdatePosition = ( mEventData->mLeftSelectionPosition != mEventData->mRightSelectionPosition );
   }
   else