-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Single line Entry throws away selected text on submission #4026
Labels
unverified
A bug that has been reported but not verified
Milestone
Comments
This patch seems to fix the problem, but I don't really know if it's the correct approach: diff --git a/widget/entry.go b/widget/entry.go
index 41967616e..5ada3d289 100644
--- a/widget/entry.go
+++ b/widget/entry.go
@@ -1028,7 +1028,9 @@ func (e *Entry) selectingKeyHandler(key *fyne.KeyEvent) bool {
return true
case fyne.KeyReturn, fyne.KeyEnter:
// clear the selection -- return unhandled to add the newline
- e.eraseSelection()
+ if e.MultiLine {
+ e.eraseSelection()
+ }
return false
} |
Good catch. |
Goltanju
added a commit
to Goltanju/fyne
that referenced
this issue
Jul 4, 2023
Goltanju
added a commit
to Goltanju/fyne
that referenced
this issue
Jul 4, 2023
3 tasks
andydotxyz
added a commit
that referenced
this issue
Jul 11, 2023
widget: Single line Entry: Submit should include selected text. (#4026)
Fix landed on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
Describe the bug
Pretty much the title, fairly simple bug I think. The single line entry will discard any selected text on submit.
How to reproduce
With a single line entry:
Screenshots
No response
Example code
Fyne version
develop
Go compiler version
1.20.5
Operating system and version
Windows 11
Additional Information
No response
The text was updated successfully, but these errors were encountered: