Problem about the TextArea focus


I tried the lv_demo_widgets, and found the textarea has a problem.

If click the user name textarea, the cursor begin to blink, and soft keyboard pops up.
Now you can type in characters with soft keyboard or your real keyboard.

Then, click the “Enter” or “Hide Soft Keyboard” button, see the following screenshot. The cursor and soft keyboard disappear, seems the textarea has lost focus. But if you press your real keyboard, the textarea still can receive characters.

As a workaround, I think we can move the focus to other widget when cursor disappear.
If to be perfect, I think we can add a property to textarea, to indicate “is editing” or not.

Does anyone find this problem?


It seems to me the problem can be solved by commenting out this line:

What do you think?

Thanks for your reply. Your are right, it’s better not clear the focus state from outside, lvgl can handle it.

Okay, I fixed it here