-
Notifications
You must be signed in to change notification settings - Fork 703
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
Pressing the ENTER key in a TextField should not move the focus #2252
Comments
That is the expected behavior if the button is set as default. If you set |
With IMHO, the expected behavior should be like Windows Forms control, where it does not loose focus. |
No, if it's false then will not trigger the button action and the |
Ah, so I do not want to do that, as that looses the ability to trigger the default button action. IMHO, it should behave be like Windows Forms, where it does not loose focus. That is a much better user experience than having the focus unexpectedly bouncing to the button. |
When the button is default it will get the focus but it can focus again the previous focused view with some change to the button action, It's a suggestion to do that feature :-) |
In ///<inheritdoc/>
public override bool ProcessColdKey (KeyEvent kb)
{
if (!Enabled) {
return false;
}
var focused = SuperView?.MostFocused;
var res = ExecuteColdKey (kb);
focused?.SetFocus ();
return res;
} |
I believe this is addressed. Closing. Reopen if you disagree. |
@tig why do you believe its addressed? was there a commit about this? |
Describe the bug
Pressing the ENTER key in a TextField should not move the focus away from the TextField.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the focus to remain in the TextField where I've pressed the ENTER key.
The text was updated successfully, but these errors were encountered: