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
Android: Add field_enter_after_edit[]
formspec element
#13836
Conversation
Haven't tested it but looks good and should fix the issue I was describing, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR. It looks good to me.
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Thank you for reviewing! A question for the formspec gurus: Do I have to bump the formspec version in this PR? I don't think so since I haven't changed any existing elements, I've only added a new one, but I'm not sure. |
I've increased the formspec version now. |
Marked the element as experimental according to a discussion on IRC. |
I'm glad you were able to have a fruitful discussion on Discord, but viewing that conversation requires an account, and even with being logged in, I get a "no text channels" error message. I assume I need to join the server, but the server information wasn't given. In contrast, IRC discussions all get logged and are easily viewable on irc.minetest.net. Thankfully, you included the relevant parts of discussion here. I just hope that if you're going to continue using Discord for these kinds of conversations, you always include all the important info on GitHub. But #minetest-dev would be good to use in my opinion. Edit: Okay, to my surprise, the Discord is listed on minetest.net. Whatever I think of that, it's still really annoying to need an account with a 3rd party to view conversations. |
The problem
The other day, there was a discussion on Discord about automatically submitting formspecs when closing the Android text input dialog. Here is a small excerpt:
The discussion starts at https://discord.com/channels/369122544273588224/369137254641303560/1152532281408372788.
The solution
This PR introduces a new formspec element:
This also works for textareas, btw. There are already many use cases for this in
builtin
alone. I've enabledenter_after_edit
for the following fields:I'm open to suggestions for better solutions to this problem.
To do
This PR is a Ready for Review.
How to test
Verify that pressing the "Done" button in the Android text input dialog still doesn't trigger an Enter keypress by default. Verify that it does trigger an Enter keypress in the cases mentioned above.
CC @rollerozxa