fixup! Let long press selection bits be handled by SelectionController
authorKarol Furmaniak <k.furmaniak@samsung.com>
Mon, 23 Feb 2015 11:06:54 +0000 (12:06 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
[Problem]: Context menu is not displayed when long tap on text links
or images.

[Solution]: HandleLongPressEventPrivate should be called only
when long press on editable area or plain text.

Bug: http://168.219.209.56/jira/browse/TNEF-167
Reviewed by: Antonio Gomes, Jaesik Chang, Marcin Kolibabka

Change-Id: I7c0c753c71b41950e7d2f505b87f77a8bff40ddc
Signed-off-by: Karol Furmaniak <k.furmaniak@samsung.com>
tizen_src/impl/selection_controller_efl.cc

index 069e45b..c41fdd1 100644 (file)
@@ -439,11 +439,13 @@ void SelectionControllerEfl::HandleLongPressEvent(
   if (context & TW_HIT_TEST_RESULT_CONTEXT_EDITABLE) {
     SetSelectionStatus(true);
     SetSelectionEditable(true);
+    HandleLongPressEventPrivate(touch_point);
   } else if (!(context & TW_HIT_TEST_RESULT_CONTEXT_LINK)
       && !(context & TW_HIT_TEST_RESULT_CONTEXT_IMAGE)
       && !(context & TW_HIT_TEST_RESULT_CONTEXT_MEDIA)
       && context & TW_HIT_TEST_RESULT_CONTEXT_TEXT) {
     SetSelectionStatus(true);
+    HandleLongPressEventPrivate(touch_point);
     LOG(INFO) << __PRETTY_FUNCTION__ << ":: link, !image, !media, text";
   } else if (context & TW_HIT_TEST_RESULT_CONTEXT_DOCUMENT) {
     LOG(INFO) << __PRETTY_FUNCTION__ << ":: TW_HIT_TEST_RESULT_CONTEXT_DOCUMENT";
@@ -455,8 +457,6 @@ void SelectionControllerEfl::HandleLongPressEvent(
   } else {
     LOG(INFO) << __PRETTY_FUNCTION__ << ":: hit_test = " << context;
   }
-
-  HandleLongPressEventPrivate(touch_point);
 }
 
 void SelectionControllerEfl::HandleLongPressEventPrivate(const gfx::Point& touch_point) {