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
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
I have button and entry.
When i tap any button, entry do not loose focus.
When i tap any label, entry loose focus.
If i use entry.FocusLost() in button handler or entry.onSubmitted, entry loose focus, but if i tap back into entry, it can't get focus. I think it's a bug.
If i tap on some label, and then into entry, it get focus.
You are typically not supposed to call entry.FocusLost yourself - Fyne calls that when it loses focus to tell the entry to update its styling. There is a bug here that Entry doesn't lose focus automatically when you tap on a button - just confirmed.
dweymouth
changed the title
Entry don't get focus on tap after entry.FocusLost()
Entry doesn't lose focus when clicking on button elsewhere
Sep 2, 2024
The problem is not only that entry don't loose focus. Entry can't get focus on tap after entry.FocusLost() until i tap any another widget, for example some lable. Just to clarify. Maybe it's important.
As Drew says that is an internal callback as a result of losing focus. If you call it directly the entry still has focus but looks like it doesn't (because you told it to). So tapping elsewhere actually unfocused it. Just tapping in entry won't do anything because it still has focus.
pierrec
pushed a commit
to pierrec/fyne
that referenced
this issue
Sep 18, 2024
Checklist
Describe the bug
I have button and entry.
When i tap any button, entry do not loose focus.
When i tap any label, entry loose focus.
If i use entry.FocusLost() in button handler or entry.onSubmitted, entry loose focus, but if i tap back into entry, it can't get focus. I think it's a bug.
If i tap on some label, and then into entry, it get focus.
How to reproduce
You can clone and run:
https://github.com/antongumenov/tong_simulator.git
Or look code here:
https://github.com/antongumenov/tong_simulator/blob/main/internal/view/main_screen_components/dump_level_widget.go
Screenshots
No response
Example code
Fyne version
v2.5.1
Go compiler version
go1.23.0 linux/amd64
Operating system and version
Arch Linux
Additional Information
No response
The text was updated successfully, but these errors were encountered: