Closed Bug 258854 Opened 20 years ago Closed 19 years ago

[BiDi] <span dir="ltr"> within <p dir="rtl"> changes display to rtl on edit of span's text

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: marco, Assigned: mozeditor)

References

Details

(Keywords: rtl)

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 I try to answer a mail. In the reply composition dialog I delete the 1st character in a quoted line. Afterwards the next paragraph gets scramled. This happens only in one of my mails - so it seems to be a very specific problem. Reproducible: Always Steps to Reproduce: 1. reply to mail 2. go to the first quoted paragraph 3. erase the first character Actual Results: Text is scramled -> mirrorinverted > Hello this is a test > this is the text of the second line > tset a si siht olle > enil dnoces eht fo txet eht si sith Expected Results: > ello this is a test > this is the text of the second line I'll attach a file with the affected paragraph - seems to be a html formated mail of a sucking m$ mailer. :-(
I have to correct my report, excuse me. The error occurs not only on deleteng the first character it occurs on deleting any character in the paragraph.
Attached file mail source (part) of affected mail (obsolete) (deleted) —
I didn't attached the mail completely. It's only the header and the affected paragraph.
That HTML formatting is from Microsoft Word. And we really need an entire message to test with, posting a fragment isn't sufficient.
I pressed ctrl-u to list the source and put it in a text file. Hope that's ok now. ok, now everybody knows that I want to do a diving course there but I don't mind. Anyway, I'm searching a buddy for the course - perhaps somebody reads this. ;-)
Attachment #158528 - Attachment is obsolete: true
Attachment #158547 - Attachment description: mail source (complete of affected mail → mail source (complete) of affected mail
Thanks for the message. I've reproduced your problem, and tracked down to being a basic HTML editing issue: I've duplicated the results in NVu. Altho all that CSS cruft from MS's editor is horrible, the problem comes down to a very simple issue: <p dir="rtl"> <span dir="ltr"> [several lines of text] </span></p> Or, very similarly: <div dir="rtl"> <p><span dir="ltr"> [several lines of text] </p></span></div> In each case, making an edit (deletion or insertion) within the <span> suddenly loses the span's LTR direction, and the block's RTL direction takes over. If the structure is, instead, <div dir="rtl"> <p dir="ltr"> <span> [several lines of text] </span> </p></div> (as is the case with the subsequent paragraphs in the message), there is no problem. Also, if the text is relatively short -- just a line, like in the first "Hallo Marco" line of the message -- the problem doesn't show up. It's probably MS's fault that this structure was ever created -- I'm not really sure why the RTL ever crept into the file in the first place. Still, we still ought to handle it better -- there are certainly going to be cases where such a structure will be useful to people who are actually using BiDi.
Assignee: sspitzer → mozeditor
Status: UNCONFIRMED → NEW
Component: Composition → Editor: Core
Ever confirmed: true
OS: Windows XP → All
Product: MailNews → Browser
QA Contact: bugzilla
Hardware: PC → All
Summary: erasing the first character of the paragraph scrambles text in next paragraph → [BiDi] <span dir="ltr"> within <p dir="rtl"> changes display to rtl on edit of span's text
Attached file Simple test case (deleted) —
Load the sample file into Composer (or NVu). Type <del>. All the lines in the paragraph reverse direction. Seen with Composer from the Moz 1.8a3-0824 build, as well as NVu 0.41; Win2K.
Hi Mike, it seems as I am not a professional bug reporter. :-/ Thanks for correcting my report. your shorter example work for me too. It's not neccessary to delete a character in composer. Just switching between "normal" and "html source" viel produces the error. But waht do you want to tell me with this? Is it now a problem of mozilla or should I do somethin with that now? Excuse me but I really don't know what I should do now. *confused* -- Regards Marco
This WORKSFORME starting from the 2005-01-25 nightly (but I can reproduce it in 2005-01-24). Most likely fixed by the patch for bug 248447.
Status: NEW → RESOLVED
Closed: 19 years ago
Depends on: 248447
Resolution: --- → WORKSFORME
Yes -- I see this working as expected in TB 1.5, but not in TB 1.0; and it works in Seamonkey 1.0 too. But the fix is not in NVu 1.0.
Status: RESOLVED → VERIFIED
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: