WebTextArea / EndOfLine fails in Microsoft Edge

I’m using XOJO Web Edition 2015R3

  Dim tCode As String
  tCode = "This is line 1" + EndOfLine + "This is line 2" + EndOfLine + "This is line 3" + EndOfLIne
  taPHPCode.Text = tCode

Windows 10, Edge Browser ignores EndOfLine displaying incorrectly as:
This is line 1 This is line 2 This is line 3
Windows 10, Chrome honors EndOfLine and displays correctly as:
This is line 1
This is line 2
This is line 3

Substituting EndOfLine for + Chr(13) + Chr(10), does not display correctly in Edge either.

Perhaps this is a known issue. My apologies if it has already been reported.

I was wondering if there is a workaround?

Kind regards, Andrew

Please report this in Feedback. Mentioning it here on the forum does not constitute a bug report.

This issue was already reported.

<https://xojo.com/issue/34720> Line breaks in WebTextArea not working in Internet Explorer 11

It is random. First time I tried to reproduce the issue, I did indeed see the three items on one line in Edge.

As I wanted to look for some kind of workaround I tried again, and now, the three items are on different lines, in both Edge and IE11.

I downloaded the example attached to 34720 and was finally able to see the issue in a reproducible manner, in both Edge and IE11.

Here is the workaround I found :

[code]Sub Shown()
dim js as string
js = js + “var ta=document.getElementById(’”+me.ControlID+"’).getElementsByTagName(‘textarea’); "
js = js + “var texte= ta[0].innerHTML; ta[0].innerHTML= texte.replace(’’,’’);”

self.ExecuteJavaScript(js)
End Sub
[/code]

Not quite sure how it works as it basically replaces an empty string by another, but it seems to be enough to put the TextArea together. I originally tried to replace a character just to see if it worked, and it repaired the line endings, so I went replace ‘’ by ‘’ and it seems to suffice :wink:

Noted, thank you Greg. I thought it a prudent first step to mention unexpected behaviors on the forum as a means to confirm my experience before raising a Feedback case. However, I should have searched Feedback more thoroughly before posting. The motivation for posting was to find a temp workaround to the issue, as much as confirm the issue.

Thank you to Michael for the workaround.

Kind regards, Andrew

The reason I mentioned this was your original post said.

I thought that was a statement of “I’m reporting this here” :slight_smile:

A lot of users do this from time to time and then are upset because we never solved their bug “report”, which we never saw.

[quote=226704:@Michel Bujardet]Here is the workaround I found :

[code]Sub Shown()
dim js as string
js = js + “var ta=document.getElementById(’”+me.ControlID+"’).getElementsByTagName(‘textarea’); "
js = js + “var texte= ta[0].innerHTML; ta[0].innerHTML= texte.replace(’’,’’);”

self.ExecuteJavaScript(js)
End Sub
[/code]

Not quite sure how it works as it basically replaces an empty string by another, but it seems to be enough to put the TextArea together. I originally tried to replace a character just to see if it worked, and it repaired the line endings, so I went replace ‘’ by ‘’ and it seems to suffice ;)[/quote]

I just noticed that MS Edge on Windows 10 fails to honor EndOfLine characters in my WebTextArea fields. Is the above still the only workaround available? Chrome doesn’t suffer this on Windows 10.

Has this changed with v2018r1 or r1.1?

Are you talking about returns entered from the keyboard, or EndOfLine, or something else ?

EndOfLine characters not being honored in TextArea fields when the Web app is loaded with Microsoft 10 Edge. Entered via code.

“Some text” + EndOfLine + “Some other text”

That will appear in one line, EndOfLine character not being honored.

Have you tried EndOfLine.Windows?

I just ran into this tonight in 2018r1.1, and I tried changing things to EndOfLine.Windows, but it didn’t help.

Please check: <https://xojo.com/issue/34720>

Just for clarification Greg, is 34720 a new fix for the next release (2018r2) that didn’t make the cut for r1.x even though the date of the “Fixed” status in Feedback was pre-2018r1.1? I’m guessing since I’m still seeing the problem in 2018r1.1 and didn’t see it mentioned in the release notes…

Correct. A fix has been submitted for a future release.