Skip to content

Editing text in an entry on android causes the press-and-hold behavior of backspace to stop working #5467

Open
@hkparker

Description

@hkparker

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

With the entry widget, when you press and hold the backspace button, it will delete a character, there will be a small delay, and then it will continue to delete characters as long as you hold it down. This is the desired behavior and it usually works well.

On android, however, if you type into an entry, then click on some earlier text and make an edit, then put the cursor back at the end, you can no longer use this feature. Now, when you press and hold backspace, it only deletes one character.

How to reproduce

  1. Type into an entry until there's a reasonable amount of text
  2. Press and hold backspace from the end, the text will all delete
  3. Type more text, but this time click back anywhere and make and edit
  4. Click the cursor back to the end and try to delete

Screenshots

screen-20250126-081935.mp4

Example code

package main

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

func main() {
	demo := app.New()
	window := demo.NewWindow("Demo")
	window.SetMaster()
	window.Resize(fyne.Size{Height: 400, Width: 400})

	window.Show()
	window.SetContent(container.NewVBox(widget.NewEntry()))

	demo.Run()
}

Fyne version

2.5.3

Go compiler version

go1.23.4 linux/amd64

Operating system and version

Android 15 / Pixel 9 Pro XL

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions