efl_ui_text: fix focus breaking

Summary:
text should not be focusable by default. Only focusable if it is
editable. This fixes mysterical focus disappearing in tests using
efl.ui.text.
Depends on D9327

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9328
This commit is contained in:
Marcel Hollerbach 2019-07-16 13:58:48 +02:00 committed by Xavi Artigas
parent 1bae8ec521
commit 059e82d4c1
1 changed files with 2 additions and 1 deletions

View File

@ -2213,7 +2213,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_text_size_changed_cb, obj);
elm_widget_can_focus_set(obj, EINA_TRUE);
efl_ui_widget_focus_allow_set(obj, sd->editable);
efl_ui_text_input_panel_layout_set(obj, ELM_INPUT_PANEL_LAYOUT_NORMAL);
efl_ui_text_input_panel_enabled_set(obj, EINA_TRUE);
@ -2390,6 +2390,7 @@ _efl_ui_text_efl_text_interactive_editable_set(Eo *obj, Efl_Ui_Text_Data *sd, Ei
if (sd->editable == editable) return;
sd->editable = editable;
efl_ui_widget_theme_apply(obj);
efl_ui_widget_focus_allow_set(obj, editable);
elm_drop_target_del(obj, sd->drop_format,
_dnd_enter_cb, NULL,