Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select Does Not Gain Focus When Tapped #4767

Closed
2 tasks done
jimorc opened this issue Apr 5, 2024 · 1 comment
Closed
2 tasks done

Select Does Not Gain Focus When Tapped #4767

jimorc opened this issue Apr 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jimorc
Copy link

jimorc commented Apr 5, 2024

Checklist

  • 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

The Select widget does not gain focus when tapped.

How to reproduce

  1. Build the example program.
  2. Run the program and set the focus to either the Entry or the Button.
  3. Click on the Select and select one of the items.
  4. Focus remains on whichever of the Entry or Button that had focus before.

Screenshots

No response

Example code

package main

import (
	"fmt"

	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/layout"
	"fyne.io/fyne/v2/widget"
)

func main() {
	myApp := app.New()
	mainWin := myApp.NewWindow("Select Test")
	entry := widget.NewEntry()
	sel := widget.NewSelect([]string{"Item 1", "Item 2", "Item 3"}, selectChanged)
	button := widget.NewButton("OK", tapped)
	box := container.New(layout.NewVBoxLayout(), entry, sel, button)
	mainWin.SetContent(box)
	mainWin.ShowAndRun()
}

func selectChanged(value string) {
	fmt.Printf("Selected value = %v\n", value)
}

func tapped() {
	fmt.Println("In tapped")
}

Fyne version

2.4.4

Go compiler version

1.22.1

Operating system and version

macOS 14.4.1

Additional Information

No response

@jimorc jimorc added the unverified A bug that has been reported but not verified label Apr 5, 2024
@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Apr 22, 2024
@andydotxyz andydotxyz self-assigned this Apr 22, 2024
@andydotxyz
Copy link
Member

Fixed on develop for v2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants