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 noticed in Rymdport (see corresponding issue at Jacalz/rymdport#142) that it wasn't possible to unfocus an Entry. I thought that it related to my extended entry (with accepts tabs instead of moving focus along) breaking something but I narrowed it down to widget.List not unfocusing other widgets in the case of it receiving a click that doesn't select any items.
How to reproduce
Start the example code below.
Focus the entry.
Try to click in between the list item and notice that the entry stays focused.
Now click the text at the bottom of the window and notice that it does unfocus correctly.
Screenshots
list-unfocus-other-widgets.webm
Example code
package main
import (
"fyne.io/fyne/v2""fyne.io/fyne/v2/app""fyne.io/fyne/v2/container""fyne.io/fyne/v2/widget"
)
funcmain() {
a:=app.New()
w:=a.NewWindow("Hello")
unfocus:=widget.NewLabel("Try to click in an empty part of the list or on this text to unfocus!")
focus:=&widget.Entry{PlaceHolder: "Focus me first!"}
list:=widget.NewList(func() int { return1 }, func() fyne.CanvasObject { returnwidget.NewLabel("Item") }, func(lii widget.ListItemID, co fyne.CanvasObject) {})
w.SetContent(container.NewBorder(focus, unfocus, nil, nil, list))
w.Resize(w.Canvas().Size().AddWidthHeight(0, 100))
w.ShowAndRun()
}
I took a quick look at the list code thinking this would be an easy fix ... but List isn't even Tappable or Mousable (only the listItem widgets are) so I have no idea what could be the cause of this, as the tap beyond the last listItem should just fall through to the driver I'd think
Checklist
Describe the bug
I noticed in Rymdport (see corresponding issue at Jacalz/rymdport#142) that it wasn't possible to unfocus an Entry. I thought that it related to my extended entry (with accepts tabs instead of moving focus along) breaking something but I narrowed it down to
widget.List
not unfocusing other widgets in the case of it receiving a click that doesn't select any items.How to reproduce
Screenshots
list-unfocus-other-widgets.webm
Example code
Fyne version
v2.4.4 and develop as of dc61414
Go compiler version
1.21.8
Operating system and version
Fedora Silverblue 39
Additional Information
No response
The text was updated successfully, but these errors were encountered: