Bug 7144

(sigh) - our lovely richtext control once again 12 October, 2021

Miguel Leeuwe
20 August, 2021
Product: PowerBuilder Category: Controls & UI
Version: 2019 R3 Build: 2703
Classification: Appeon bug Publishing: Public
Priority: P1
Status: Scheduling Reason:
Mark Lee @Appeon 30 August, 2021
#16
Hi Miguel,

You are welcome!
Thanks for your feedback.


Regards,
Mark Lee
Miguel Leeuwe 27 August, 2021
#15
Thank you Mark Lee.
Luckily the workaround is easy to apply and I don't have too many RTE controls which are DisplayOnly.
regards
Mark Lee @Appeon 27 August, 2021
#14
Hi Miguel,

Thanks for providing the test case!
I can reproduce it on our side in PB 2019 with TX v28 control.
We will escalate this problem to our development team for further analysis. 
We will need some time to figure it out and will get back to you if any progress we would make.
 
BTW, if I run this case in PB 2017 R3, or PB 2019 R3 with TX v15, or PB 12.6, this issue doesn't exist.

Regards,
Mark Lee
Miguel Leeuwe 26 August, 2021
#13
pb2017_pasteRTF.zip (13KB)

third and last attachment
Miguel Leeuwe 26 August, 2021
#12
pb2019_pasteRTFV15.zip (15KB)

second attachment
Miguel Leeuwe 26 August, 2021
#11
pb2019_pasteRTFV28.zip (15KB)

Okay, I've made three sample apps.
One in PB 2017 R3 and 2 in PB2019.
The one that has the failing / changed behaviour is the one called "pb2019_pasteRTFV28.zip".
The fix is easy (uncheck DisplayOnly before assigning text), but it IS changed behaviour.
I've also found out that it works the FIRST time when you click on the button, but after that it constantly fails.
Have Fun!
Mark Lee @Appeon 23 August, 2021
#10
Hi Miguel,

Thanks for your understanding.
I didn't say it clearly, what I mean is that I will build a sample test case to reproduce it, but I am not sure whether it can be 100% duplicated, thus it would be better that you could provide a sample test case to us for analysis. Thanks in advance.

Regards,
Mark Lee
Miguel Leeuwe 23 August, 2021
#9
LOL,
You say "I will build a sample test case to reproduce and analyze it on our side."... If so, why would I also have to create one?
No problem, when I have some time, I'll upload a small sample app to illustrate the different behavior between v15 and v28.
:)
Mark Lee @Appeon 23 August, 2021
#8
Hi Miguel,

Thanks for reporting this problem.
I will build a sample test case to reproduce and analyze it on our side. 
BTW, does this issue only happen on RichText DataWindow, or does it also happen on the RichText control in a window?
If possible, we suggest that you provide a reproducible test case for us to reproduce on our side. Thanks in advance.

Regards,
Mark Lee
Miguel Leeuwe 20 August, 2021
#7
Thank you.
Paste() and InsertDocument() will also fail when DisplayOnly = true. (so it's not only ReplaceText() ).
Francisco Martinez @Appeon 20 August, 2021
#6
Hi Miguel,

Thank you for sharing the workaround! We'll record it for future instances of this issue.

Regards,
Francisco
Miguel Leeuwe 20 August, 2021
#5
know = now
Miguel Leeuwe 20 August, 2021
#4
Okay, I found the workaround.
The problem is that my rte is 'DisplayOnly'. With V15 that doesn't matter, I can still assign text with ReplaceText or Past(), but ... with v28.0 that stopped working.
What I have to do know, is first set the DisplayOnly to false, assign the text and then set DisplayONly to True again.
Miguel Leeuwe 20 August, 2021
#3
Thank you very much!
Meanwhile I'm trying to find a workaround and will post it here if I find one.
Francisco Martinez @Appeon 20 August, 2021
#2
Hi Miguel,

Thanks for reporting this issue. I'll immediately transfer it to our main Support/Engineering team for their review and feedback.

Regards,
Francisco
Miguel Leeuwe 20 August, 2021
#1
but = bug
Miguel Leeuwe 20 August, 2021
*Phenomenon:
Okay, in pb 2017, the V15.x version of the richtext edit control was working "kind of"....
When we migrated to pb 2019 r3, it turned out that that v15.x version no longer behaved the same way as the v15 of 2017: It screwed up previously save html with SaveDocument() and using Insertdocument() to import it.
So ... we were happy to learn that the v28.0 version of the richtext did not have this problem with the import of html. (only a small problem when pasting images and then saving as html and some of the images having a reference in the html to a non existing temporary image file. This is a bug I reported already some time ago).
Today I sadly discouvered another but:
When you use ReplaceText() and there is no text at all on the RTE, the ReplaceText() function returns the amount of characters replaced, but nothing appears on the RTE. If I switch back to using V15 without doing any changes in the code, that DOES work.

I'll spare you from telling you about how I feel about this.
kind regards

*Reproduce Steps:


Remarks:
OS:
Windows 10
Platform:
64-bit
Database Type:
Database Version: