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

Backspace and Delete key Do not Fire OnChanged Event #4117

Closed
2 tasks done
heejit opened this issue Aug 1, 2023 · 2 comments
Closed
2 tasks done

Backspace and Delete key Do not Fire OnChanged Event #4117

heejit opened this issue Aug 1, 2023 · 2 comments
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@heejit
Copy link

heejit commented Aug 1, 2023

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

Entry widget do not fire Onchanged event on Delete and Backspace Key.

How to reproduce

Attached code

Screenshots

No response

Example code

package main

import (
	"fmt"

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

func main() {
	fyneApp := app.NewWithID("com.xyz")
	mainWin := fyneApp.NewWindow("Bug Report")
	mainWin.SetMaster()
	mainWin.Show()

	w := widget.NewEntry()
	w.SetPlaceHolder("On Backspace and Delete Key OnChanged event do not fire")
	w.OnChanged = func(v string) {
		fmt.Println("On Changed called")
	}

	mainWin.SetContent(w)

	fyneApp.Run()
}

Fyne version

fyne.io/fyne/v2 v2.3.6-0.20230801132204-0b324c4306a0

Go compiler version

1.20

Operating system and version

Linux

Additional Information

No response

@heejit heejit added the unverified A bug that has been reported but not verified label Aug 1, 2023
@dweymouth dweymouth added the blocker Items that would block a forthcoming release label Aug 1, 2023
mbaklor added a commit to mbaklor/fyne that referenced this issue Aug 2, 2023
@Jacalz Jacalz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Aug 2, 2023
Jacalz pushed a commit that referenced this issue Aug 20, 2023
This adds a call to `entry.OnChanged()` every time `entry.updateText` is called.
While I was at it I also added a call to `e.Validate` where I didn't see one.

Fixes #4117
@andydotxyz
Copy link
Member

Resolved on develop

@heejit
Copy link
Author

heejit commented Aug 22, 2023

I tested it is okay now.

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

4 participants