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

Selecting items from a list causes the keyboard to popup on Android. Also blocks back action. #4236

Closed
2 tasks done
alexballas opened this issue Sep 11, 2023 · 5 comments
Closed
2 tasks done
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@alexballas
Copy link
Contributor

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

When I select the items from a list, this causes the keyboard to popup. Is there a scenario where we would require this? I tested it by compiling the list example here https://developer.fyne.io/collection/list

As a side effect, after you select an item, doing the back action multiple times in an attempt to exit the app, stops working.

How to reproduce

  • select an item from the list in android
  • observe the keyboard popping up
  • Now try to exit by pressing the back action on your mobile
  • First back action will close the keyboard
  • Subsequent back actions do nothing

Screenshots

No response

Example code

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
)

var data = []string{"a", "string", "list"}

func main() {
	myApp := app.New()
	myWindow := myApp.NewWindow("List Widget")

	list := widget.NewList(
		func() int {
			return len(data)
		},
		func() fyne.CanvasObject {
			return widget.NewLabel("template")
		},
		func(i widget.ListItemID, o fyne.CanvasObject) {
			o.(*widget.Label).SetText(data[i])
		})

	myWindow.SetContent(list)
	myWindow.ShowAndRun()
}

Fyne version

v2.5.0

Go compiler version

1.21.0

Operating system and version

Android 10

Additional Information

No response

@alexballas alexballas added the unverified A bug that has been reported but not verified label Sep 11, 2023
@andydotxyz
Copy link
Member

Ah, so this is as a result of being focusable I guess.

I don't think the inoperable back button relates to this issue though. Are you sure you compiled using the latest fyne tool as well? You need latest both for the interceptable back operation to work (added in v2.4.0).

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Sep 12, 2023

Verified

This commit was signed with the committer’s verified signature.
weswigham Wesley Wigham
Fixes fyne-io#4236
@alexballas
Copy link
Contributor Author

Hello Andy, yes I'm using the latest fyne cli tool.

$ fyne version
fyne cli version: v2.4.0

The interceptable back operation works fine, it's just that when the list is in focus and the keyboard pops, back stops working when sending multiple back actions. You can still make it work by tapping somewhere else inside the app as long as you're not tapping that same list widget.

For my case I just disabled the list focus, so problem solved, but I do find this a bit annoying for the people who actually want their lists to be focusable.

@andydotxyz
Copy link
Member

The focus issue is fixed. It would be good to know if your back button problem is still an issue after the list focus fix is applied...

@andydotxyz
Copy link
Member

Sorry it appears the PR never got opened for some reason. up now.

andydotxyz added a commit that referenced this issue Sep 29, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fixes #4236
@andydotxyz andydotxyz added bug Something isn't working blocker Items that would block a forthcoming release and removed unverified A bug that has been reported but not verified labels Sep 29, 2023
@andydotxyz andydotxyz added this to the D fixes (v2.4.x) milestone Sep 29, 2023
@andydotxyz
Copy link
Member

Fixed on develop, will merge it back into next release

andydotxyz added a commit that referenced this issue Oct 4, 2023

Verified

This commit was signed with the committer’s verified signature.
weswigham Wesley Wigham
Fixes #4236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants