From 51ec59451b1290a4ad49c623bda364a7e7b4d030 Mon Sep 17 00:00:00 2001 From: Jiwon Kim Date: Mon, 16 Jan 2017 20:09:31 +0900 Subject: [PATCH] elm_entry: Don't do anything if text is empty In the double clicked callback, selection & copy paste UI is not needed. test plan: elm_entry_context_menu_disabled_set(entry, EINA_TRUE) -> double click empty entry -> cursor is disappeared (This commit fix to be shown) @tizen_only Change-Id: Ide70085a3deebc403259b5e3b967a32e23beef91 Signed-off-by: Jiwon Kim (cherry picked from commit 917a717f057f51dad57445cb24550b5b2431d7ec) --- src/lib/elm_entry.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index dc27f3f..d9d9d09 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -4039,10 +4039,14 @@ _entry_mouse_double_signal_cb(void *data, const char *source EINA_UNUSED) { // TIZEN ONLY (20140205): Support CopyPaste UI + const char *text; ELM_ENTRY_DATA_GET(data, sd); if (sd->disabled) return; //??? - if (!_elm_config->desktop_entry) + text = edje_object_part_text_get(sd->entry_edje, "elm.text"); + + if ((!_elm_config->desktop_entry) && + (text) && (text[0] != '\0')) { _cursor_down_pos_set(data); _select_word(data, NULL, NULL); -- 2.7.4