spinner: Fix entry not inactive even gets an enter key cb. 56/46956/3
authorWoochan Lee <wc0917.lee@samsung.com>
Fri, 24 Apr 2015 07:27:15 +0000 (16:27 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Thu, 27 Aug 2015 11:05:58 +0000 (04:05 -0700)
Summary:
 The entry inactive signal emitted when finish spinner value set.
but the active signal emitted after that. so it makes weird view state.

 The function 'key_action_toggle()' called twice. (for entry, spinner)
event propagate called this func twice and its make this issue.

This patch makes to ignore toggle event when entry is not visible.
T2262

Test Plan:
Run elementary_test, execute spinner widget sample.

Click the first spinner.
Input something on entry.
Press enter key.
Check the issue.

Reviewers: raster, Hermet

Subscribers: kuuko

Differential Revision: https://phab.enlightenment.org/D2411

Change-Id: I0caa58a4751938319d0a0d8739dc9f5edd4b2deb
Origin: upstream

src/lib/elm_spinner.c

index 413a09213efdbafab19b01585561bab5f0140efe..64c6a8c499f6b787ee761d95710d5c52475ba494 100644 (file)
@@ -457,7 +457,7 @@ _key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED)
 {
    ELM_SPINNER_DATA_GET(obj, sd);
    if (sd->spin_timer) _spin_stop(obj);
-   else _entry_toggle_cb(NULL, obj, NULL, NULL);
+   else if (sd->entry_visible) _entry_toggle_cb(NULL, obj, NULL, NULL);
    return EINA_FALSE;
 }