Using your Editor2 demo, try this on Android (it does occur on iOS, but nowhere nearly as bad).
Type a few words, but leave the caret at the last word you typed (no space). Now type 3 more non-space chars and then start tapping the Undo more than 3 times. Watch the behavior to what gets undone. You should see the last word eventually get undone as expected, but then it starts coming back. It will do that 3 times before it starts undoing the other words you typed (but may repeat the same behavior). The undo buffer seems to have gone wonky (technical term).
If I have text already loaded, and I place the caret at the end of a word and tap a few chars, the undo will undo the existing word but will come back as you keep hitting the undo, at least on Android (don't see that on iOS).
TRichViewFMX v23
Delphi 12.3
Android and iOS keyboard issue with undo
-
- Site Admin
- Posts: 17907
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Android and iOS keyboard issue with undo
I need several days to complete the current work and check this issue. Sorry for the delay.
-
- Posts: 63
- Joined: Sun May 25, 2025 6:41 pm
Re: Android and iOS keyboard issue with undo
No problem... this one is probably not urgent. It was just very weird that a customer might run into, so thought you might want to check it out. On android it did some bad stuff to a table, like delete it, or duplicate some text around the table, not on iOS though.
-
- Site Admin
- Posts: 17907
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Android and iOS keyboard issue with undo
Unfortunately, this is not an editor's bug.
Delphi 12 implements text input on Android in a crazy way.
The native Android way (as was implemented in older versions of Delphi) is to replace the changed text with a new one when a new character is typed.
Delphi 12 instead emulates keystrokes. When the user types a character, this first deletes the current word (simulating multiple Backspace/Delete presses), then enters the changed word (with a new character), character by character.
Everything works fine, but all operations are undone one by one, which causes the wild effect you described.
I'll see if I can do something about it. But I'm not sure about the next update.
Delphi 12 implements text input on Android in a crazy way.
The native Android way (as was implemented in older versions of Delphi) is to replace the changed text with a new one when a new character is typed.
Delphi 12 instead emulates keystrokes. When the user types a character, this first deletes the current word (simulating multiple Backspace/Delete presses), then enters the changed word (with a new character), character by character.
Everything works fine, but all operations are undone one by one, which causes the wild effect you described.
I'll see if I can do something about it. But I'm not sure about the next update.