12

Using Tmemo in my application, to allow the user to enter notes, I found that when editing the text or using the backspace key, very strange things happen.

For example, it's not possible to move the cursor to the end of the text, or deleting some letters of a word, in this case, the text will completely replaced by other unexpected words. I posted a video showing this strange behavior.

I don't know if there is a correlation, but it seems that the problem is more pronounced when the text comes from the voice dictation provided by the keyboard, or when the text is composed of words selected by the forecast suggestion of the software keyboard.

This problem was already present in old versions of Delphi (Xe 10.1), but they were solved by modifying some pas files and replacing the calssex file with a new classex.dex found on the net.

Now I'm using Delphi 10.4 Sydney patch3

Tested on

  • Tablet lenovo tb-x606x android 9
  • xioami note 7 andorid 10
  • huawei p20 pro android 10
  • samsung S7 Android 8
  • samsung A40 Android 10

Anyway, I am also attaching the source of a test, where it's possible to see the strange behavior of the Tmemo.

I also opened a ticket on Embarcadero quality support (RSP-31362)

The video (linked here)

The source code (linked here)

I found the same problem in another ticket on Embarcadero quality support RSP-31134

Gianluca Colombo
  • 717
  • 17
  • 38
  • Is the problem different or does it disappear, if you change to a bigger font? – Tom Brunberg Oct 20 '20 at 16:18
  • @TomBrunberg I tried as you suggested but nothing changed. – Gianluca Colombo Oct 20 '20 at 23:01
  • What event you have on your TMemo ? – Bosshoss Oct 22 '20 at 08:00
  • @Bosshoss no events on Tmemo – Gianluca Colombo Oct 22 '20 at 09:55
  • the same problem is reported from another user on [RSP-31134](https://quality.embarcadero.com/browse/RSP-31134) – Gianluca Colombo Oct 28 '20 at 07:58
  • 1
    Awaiting for a solid solution, I tryed to use TTMSFMXRichEditor (TMS Software) instead of TMemo. In that way, my app works witouth problems – Gianluca Colombo Nov 24 '20 at 05:54
  • @Gianluca Colombo. I'm also experiencing similar behavior problems when using the TMemo in Firemonkey. The cursor sometimes position itself in random areas of the text and overwrites existing text or just continues to add. It looks like the problem occurs when using the full stop"." and or backspace and maybe other symbols (Non charaters). I'm using Delphi 10.1. Did you find a solution or workaround to the TMemo as I would rather not use third party controls? – Yuppski Mar 10 '21 at 07:58
  • 1
    @Yuppski still no solutions found. Embarcadero has closed the ticket declaring thet the issue has been resolved in RadStudio 10.4.2. I'll try it as soon as possible – Gianluca Colombo Mar 10 '21 at 08:59
  • @Gianluca Colombo.Thanks for the reply. I've seen a similar/same problem on another stackoverflow post titled "Delphi 10 Seattle strange Memo behaviour on Android 6". Remi suggested using a Swiftkey Keyboard. I have downloaded the "Microsoft SwiftKey Keyboard",from Google Play, on my android and switched to use the keyboard(was originally Samsung Keyboard) and from my initial test it appears to work. I'd be interested if this works for you/others. – Yuppski Mar 10 '21 at 10:26
  • @Yuppski the user of that question prematurely closed that question stating he solved the problem. I have non samsung keyboard i.e. microsoft swift keyboard yet the problem happened on multiple devices. it was clearly TMemo's problem not android'a. – user30478 Aug 10 '21 at 18:24
  • 2
    @user30478 the problem has been solved with new Delphi 10.4.2 Sydney – Gianluca Colombo Aug 11 '21 at 06:02
  • 2
    @GianlucaColombo That forced me to upgrade and the error is thankfully gone. – user30478 Aug 11 '21 at 15:01
  • 1
    I’m voting to close this question because it was caused by a bug in the compiler. And therefore is of no use to future visitors – Rohit Gupta Oct 26 '22 at 23:57
  • 2
    I’m voting to close this question because it is a bug fixed in Delphi 10.4.2. – fpiette Oct 27 '22 at 07:03
  • I'm voting to close this question because it doesn't ask a question. – TylerH Feb 28 '23 at 16:54

1 Answers1

1

This was a bug in earlier versions of Delphi FMX.

It is fixed in Delphi 10.4.2 and later.

Shaun Roselt
  • 1,650
  • 5
  • 18
  • 44