Page MenuHomePhabricator

elm: EFL_UI_TEXT_EVENT_CHANGED for the BACKSPACE key emitted too early
Closed, ResolvedPublic

Description

Look at the Text Editor sample app in C, in my branch devs/xartigas/fix_text_changed:

https://git.enlightenment.org/tools/examples.git/tree/apps/c/texteditor/src/texteditor_main.c?h=devs%2Fxartigas%2Ffix_text_changed

This is the regular text editor app with a line of debug output: every time the EFL_UI_TEXT_EVENT_CHANGED or EFL_UI_TEXT_EVENT_CHANGED_USER events are emitted, the content of the main text entry are retrieved with efl_text_get() and printed on screen.

It can be seen that every time a key is pressed, the retrieved content of the text entry changes, except when backspace is pressed. When this key is pressed, the content of the widget changes, but the content retrieved with efl_text_get() does not.

Upon receiving the next key press, everything is fine, so it just looks like the EFL_UI_TEXT_EVENT_CHANGED event is emitted before the content of the widget is updated.