From: Victor Cebollada Date: Mon, 27 Feb 2017 17:02:47 +0000 (+0000) Subject: Fix for the highlight box. X-Git-Tag: dali_1.2.29~4 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=add5213c027c1bab9faaac7070ce43aae174e5f0 Fix for the highlight box. * 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 --- diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index 3a44c2f..e250542 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -2198,6 +2198,12 @@ void Controller::Impl::RepositionSelectionHandles( float visualX, float visualY 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