Closed Bug 247691 Opened 20 years ago Closed 18 years ago

Setting document.dir='rtl' for plain text file does not right align text.

Categories

(Core :: Layout: Block and Inline, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: eyalroz1, Unassigned)

References

Details

(Keywords: rtl, testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040615
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040615

See below:

Reproducible: Always
Steps to Reproduce:
1. create a bookmark with the following location

javascript:(function(){if (document.dir=='rtl') document.dir='ltr'; else
document.dir='rtl';})()

2. Open a text file (can be in Hebrew but English is fine) in which some lines
fit the viewport width and some do not.
3. press the bookmark (this changes the page direction from LTR to RTL, and
works fine for HTML pages)

Actual Results:  
The shorter lines become aligned to the right edge of the viewport, and the long
lines remain aligned to the left.

Expected Results:  
Everything should be aligned to the right of the canvas, i.e. when you scroll
right all the way you should see the rightmost character of each line.
here's a text file for those of you too lazy to get one elsewhere.
Possibly a dupe of bug 96394?
I can't see how this relates to the "margin: auto" CSS property, or to nested
DIVs. Of course, there may be some behind-the-scenes linkage of these issues of
which I am not aware.

Depends on: 96394
Confirming bug, 2004-08-01-07 trunk Linux.
Assignee: mkaply → nobody
Severity: trivial → minor
Status: UNCONFIRMED → NEW
Component: Layout: BiDi Hebrew & Arabic → Layout: Block and Inline
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
QA Contact: zach → core.layout.block-and-inline
Summary: faulty right-alignment of text files → Setting document.dir='rtl' for plain text file does not right align text.
Attachment #159888 - Attachment is patch: false
Attachment #159888 - Attachment mime type: text/plain → text/html
You know, I'm not at all convinced this really depends on bug 96394.
This was fixed by the fix to bug 318116 (which technically is a duplicate of this bug, I guess).
Note that now there's no horizontal scrollbar on the testcase, but this is OK, since the containing block (the <body>) is not RTL.
Status: NEW → RESOLVED
Closed: 18 years ago
Depends on: 318116
No longer depends on: 96394
Resolution: --- → FIXED
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: