Closed Jerakin closed 2 years ago
I tried to reproduce this but failed. I need a bit more info:
use_marked_text
config setting on the input field and if so which value (true or false)?I used the gooey example project, happens in all fields that take character input. Only tried it on Android (two different). Android version 10 (both).
Engine 1.2.171
I also noticed that I can do
12.
and click space to get 12.1212.
so I don't need to do "two character" after the .
to get it to expand.
I checked iOS and it doesn't happen there, I guess you tried on iOS before?
I have some good news and some bad news!
Good news first, I don't think this is Gooeys fault. The bad news are that I think it's Defold fault.
I made a simple test project with only this gui_script in it
function init(self)
msg.post(".", "acquire_input_focus")
gui.show_keyboard(gui.KEYBOARD_TYPE_DEFAULT, false)
self.str = ""
end
function on_input(self, action_id, action)
if action_id == hash("text") then
self.str = self.str .. action.text
print(action.text, self.str)
gui.set_text(gui.get_node("text"), self.str)
end
end
When I write the string 12.345
this is what happens character by character:
1
DEBUG:SCRIPT: 1 1
2
DEBUG:SCRIPT: 2 12
.
DEBUG:SCRIPT: . 12.
3
DEBUG:SCRIPT: 3 12.3
4
5
DEBUG:SCRIPT: 12.345 12.312.345
When I write 4
the log doesn't say anything
I'm not able to reproduce this problem. Closing.
If you do
1.23
it will/might automatically expand into1.11.23
Here are some other examples
123.45
->123.123123.45
123.ab
->123.33.ab
ab.123
->ab.123
.
->.
It feels like it start doing odd stuff as soon as there is a . and some recommended/auto correction text.