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

Controlling the slider with the left arrow key blocks after 8 steps #4736

Closed
2 tasks done
chmike opened this issue Mar 23, 2024 · 1 comment
Closed
2 tasks done

Controlling the slider with the left arrow key blocks after 8 steps #4736

chmike opened this issue Mar 23, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@chmike
Copy link
Contributor

chmike commented Mar 23, 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

When controlling a slider with the keyboard arrow keys, it works without problem when typing the right arrow.

It blocks after more or less 8 steps when typing the left arrow regardless of the initial value. The number of steps may vary.
I tested it with min = -1. and max = 0, steps = 0.001.
The problem doesn't show up when min = 0, max = 1.

How to reproduce

Create

Screenshots

No response

Example code

The following code can be used to see the problem.

When the window shows up, click the slider circle to select it. Then use the right and left arrows.

package main

import (
	"fmt"

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

func main() {
	a := app.New()
	w := a.NewWindow("Hello World")

	slider := widget.NewSlider(-1, 0)
	slider.Step = 0.001
	slider.OnChanged = func(x float64) {
		fmt.Println("slider value:", x)
	}
	w.SetContent(slider)
	w.Resize(fyne.NewSize(200, 200))
	w.ShowAndRun()
}

Fyne version

2.4.4

Go compiler version

go version go1.21.4 linux/amd64

Operating system and version

Ubuntu 22.04.4 LTS (jammy)

Additional Information

No response

@chmike chmike added the unverified A bug that has been reported but not verified label Mar 23, 2024
@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Mar 27, 2024
@andydotxyz andydotxyz added this to the D fixes (v2.4.x) milestone Mar 27, 2024
andydotxyz added a commit to andydotxyz/fyne that referenced this issue Mar 27, 2024
andydotxyz added a commit to andydotxyz/fyne that referenced this issue Mar 27, 2024
andydotxyz added a commit that referenced this issue Apr 2, 2024
andydotxyz added a commit that referenced this issue Apr 2, 2024
@andydotxyz
Copy link
Member

This is now resolved on develop and the release branch ready for v2.4.5

@andydotxyz andydotxyz modified the milestones: D fixes (v2.4.x), v2.4.5 Apr 2, 2024
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