Recent

Author Topic: [SOLVED] Problem with post editor - [code] tag  (Read 610 times)

paweld

  • Hero Member
  • *****
  • Posts: 521
[SOLVED] Problem with post editor - [code] tag
« on: August 20, 2022, 02:08:54 pm »
Hi,Something has recently gone wrong with the forum post editor, specifically with adding code:
- "insert code" does not close the tag.
- writing code manually (and not by pasting from Lazarus) causes newline characters to disappear, even after editing several times the characters disappear randomly. Often pressing "return" twice helps, but not always.
I checked on Mozilla Firefox (Windows and Android) and MS Edge (Windows).
« Last Edit: August 21, 2022, 10:33:47 pm by paweld »
Best regards
paweld

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8421
  • Debugger - SynEdit - and more
    • wiki
Re: Problem with post editor - [code] tag
« Reply #1 on: August 20, 2022, 02:49:04 pm »
Quote
"insert code" does not close the tag.
Works fine for me. Win 10, Firefox.

I can do both, press the "insert code" button first, then insert the text - or insert and select the text, and then press the button.

paweld

  • Hero Member
  • *****
  • Posts: 521
Re: Problem with post editor - [code] tag
« Reply #2 on: August 20, 2022, 05:16:51 pm »
test
Code: Pascal  [Select][+][-]
  1. procedure test;
  2. var  s: String;  i: Integer;begin  s := 'test';  i := 2;  Writeln(Format('% %d', [s, i]);end;

 test 2
Code: Pascal  [Select][+][-]
  1.  procedure test2;
  2. var
  3.   a, b: Integer;
  4.   s: String;
  5. begin
  6.   s := 'test2';
  7.   a := 2;
  8.   b := 3;
  9.   WriteLn(s + IntToStr(a * b));
  10. end;


test 3: on new vm windows 10, ms edge without any plugins
Code: Pascal  [Select][+][-]
  1. procedure test3;
  2. var
  3.   a: Char;
  4.   s: String;
  5. begin
  6.   a := 'a';
  7.   s := 's';
  8.   Writeln(a + ' ' + s);
  9. end;
  10.  
test 4
Code: Pascal  [Select][+][-]
  1. procedure test4;var  x: Integer;  y: Integer;begin  x := 1;  y := x * 2;end;

test 5
Code: Pascal  [Select][+][-]
  1. procedure test5;var  x: Integer;begin  x := 1;end;

note: I edited the first example the see if it was the text entered. I placed a return after test; and it wrapped. Marc
« Last Edit: August 22, 2022, 05:19:12 pm by paweld »
Best regards
paweld

paweld

  • Hero Member
  • *****
  • Posts: 521
Re: Problem with post editor - [code] tag
« Reply #3 on: August 20, 2022, 05:23:42 pm »
Here is an screen recording of the writing of the previous post: https://drive.google.com/file/d/1uRzb19YKqJ9VvOA-eJiH8ADxFKHAvbjd/view?usp=sharing
Best regards
paweld

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8421
  • Debugger - SynEdit - and more
    • wiki
Re: Problem with post editor - [code] tag
« Reply #4 on: August 20, 2022, 07:27:45 pm »
I believe you its happening. The question is why it doesn't happen for me.

My Firefox is up to date at 103.0.2 (64bit)
My Windows is at 21H1

I just checked 21H2 is out since August 9, 2022 => so if you got that already, maybe.... Doesn't explain though why you get the issue on Android too.

I copied your code (without line breaks), and then manually inserted the linebreaks. At the time of writing this I checked via "preview" => and it looks fine.

Code: Pascal  [Select][+][-]
  1. procedure test;
  2. var
  3.   s: String;
  4.   i: Integer;
  5. begin
  6.   s := 'test';
  7.   i := 2;
  8.   Writeln(Format('% %d', [s, i]);
  9. end;
  10.  



I pinged the server admin.
Maybe he has some ideas.


paweld

  • Hero Member
  • *****
  • Posts: 521
Re: Problem with post editor - [code] tag
« Reply #5 on: August 20, 2022, 08:07:03 pm »
I pinged the server admin.Maybe he has some ideas.
Thank you.

It started doing this about two weeks ago.
It happens the same way if I type from firefox on my phone (android).
Problem not exists when I paste the code from lazarus
Best regards
paweld

paweld

  • Hero Member
  • *****
  • Posts: 521
[SOLVED] Re: Problem with post editor - [code] tag
« Reply #6 on: August 21, 2022, 09:24:05 pm »
I managed to find a solution to the problem - not very convenient but it works - I have to put a space character at the end of each line, then the code is displayed correctly.
Best regards
paweld

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2557
Re: [SOLVED] Problem with post editor - [code] tag
« Reply #7 on: August 22, 2022, 12:00:36 pm »
It's strange. I quess it is some kind of plugin (autocomplete ?) which manipulates your keyboard input since pasting code does work.

Marc
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

paweld

  • Hero Member
  • *****
  • Posts: 521
Re: [SOLVED] Problem with post editor - [code] tag
« Reply #8 on: August 22, 2022, 12:37:46 pm »
Thank you for the hint, I will look for the cause.
To tentatively rule out browser or OS fault I checked on laptop and phone and on firefox and edge (edge has no plugins).
On the other hand, on a freshly installed Win10 in VirtualBox is ok, so I have to look for the cause.
Sorry for the confusion.
Have a nice day.
Best regards
paweld

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8421
  • Debugger - SynEdit - and more
    • wiki
Re: [SOLVED] Problem with post editor - [code] tag
« Reply #9 on: August 22, 2022, 02:11:15 pm »
One more idea. Use Firefox build-in inspector. Go to the network tab.

Then post some code. And find the http post to look at the payload. What was actually submitted?

Code: Pascal  [Select][+][-]
  1. 1
  2. 2
  3. 3



I checked while posting this (the above). Unfortunately Firefox shows the payload as text, with no indication of the linefeed kind Cr / Lf / CrLf
« Last Edit: August 22, 2022, 02:17:22 pm by Martin_fr »

 

TinyPortal © 2005-2018