You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
lost_focus gets correctly called when clicking in an area without widget or when pressing ENTER but
lost_focus does not get called in the following cases:
when focus is given to another widget (e.g. clicking on another single_text_edit)
when tab is pressed (focus is given to the first widget of the panel while you would expect the next widget to get focus and the current widget to lose focus
Case 1:
Click on a single_text_edit to get focus
Click on a second single_text_edit --> you get focus on the second widget without lost_focus getting called on the first one
Case 2:
Click on a single_text_edit to get focus
Press tab --> the first widget gets focus without lost_focus being called on our focused widget
Press tab until you reach the correct widget --> the lost_focus gets correctly called when leaving the considered widget
Expected behavior
a) lost_focus should be called when focus is given to another widget
b) Pressing TAB for the first time should move to the widget just after the currently widget under focus (and call lost_focus)
**Desktop **
OS: MACOS
Browser Chrome
Version 105.0.5195.125
The text was updated successfully, but these errors were encountered:
I've run into this myself (case 1), and it's still present on the latest master.
Digging a bit deeper, the problem is actually dependant on the ordering. If you click from one TextEdit field to another created later, then the lost_focus() event is missed. But if you click to one created previously, then lost_focus()` works as expected.
phire
added a commit
to phire/egui
that referenced
this issue
Aug 13, 2023
Has been tested in master branch.
Describe the bug
lost_focus gets correctly called when clicking in an area without widget or when pressing ENTER but
lost_focus does not get called in the following cases:
Case 1:
Click on a single_text_edit to get focus
Click on a second single_text_edit --> you get focus on the second widget without lost_focus getting called on the first one
Case 2:
Click on a single_text_edit to get focus
Press tab --> the first widget gets focus without lost_focus being called on our focused widget
Press tab until you reach the correct widget --> the lost_focus gets correctly called when leaving the considered widget
Expected behavior
a) lost_focus should be called when focus is given to another widget
b) Pressing TAB for the first time should move to the widget just after the currently widget under focus (and call lost_focus)
**Desktop **
The text was updated successfully, but these errors were encountered: