Opened 15 years ago

Closed 11 years ago

#691 closed defect (inactive)

RTL is not repeated in new paragraph after pushing 'Enter"

Reported by: Y. Pelleg Owned by: akaEdge
Priority: normal Milestone: 2.0
Component: Documentation Version: trunk
Severity: major Keywords: RTL Arabaic Hebrew BiDi


Before I explain the bug, first of all it is very important to stress that this bug occurs when one starts typing in a "virgin" editor (which is unfortunately usually the case). By virgin I mean that after initialization of the editor, you start typing right away in the totally empty editor, without having touched anything else
Therefore you will NOT see this bug in the example files, because "ipsum" had been inserted and therefore, even when you delete that, the textarea is not "virgin" anymore - a <br /> stays there.
It also won't happen if before typing the first characters you toggle the "show html" button at least once, which somehow inserts a <br /> tag.

The bug:
If one starts typing in LTR direction and then change the direction to RTL by pushing the relevant button, you will have your next paragraph RTL allright, but after writing it, on pushing "Enter" the next new paragraph will return to be be LTR directed (in other words, the cursor jumps back to left again!).
This is of course an enormous nuicance when one wants to type many paragraphs in RTL, since after every paragraph the direction the RTL button has to be pushed again.
The same thing happens the other way round: when after initialization of the editor you directly push the RTL button and type some lines in RTL, the paragraphs will stay RTL allright, but if then you push the LTR and start typing in English, then after pushing Enter the cursor will jump back to the right again...

Looking at the generated html, you see that when after the bug occurs <p>&nbsp;</p> is inserted for the next new paragraph after hitting Enter, when the bug does not occur, then <p style="direction: rtl;"> <br /> </p> is inserted when pressing Enter.

What I do for the moment, is before typing I indeed toggle the "show html" button at least once, but that is of course no solution, just a get-around.

I don't know why this occurs, but I guess for the Xinha programmers it must be easy to locate.
Maybe the solution is to make the code insert a <br /> tag in any case on initialization, maybe the solution lies somewhere else.

Thanks for an otherwise great application!!

Change History (1)

comment:1 Changed 11 years ago by gogo

  • Resolution set to inactive
  • Status changed from new to closed

Patches welcome.

We need a developer who works in RTL.

Note: See TracTickets for help on using tickets.