Closed Bug 265279 Opened 20 years ago Closed 20 years ago

CSS attribute STYLE="direction: rtl;" doesn't work in File form fields

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mwhaley, Unassigned)

References

()

Details

(Keywords: rtl)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803

This renders OK in IE5/6, but the right-to-left doesn't work in Mozilla 1.7.2.
This is part of a file-uplaod system where having the fields pushed to the right
(to show the filename instead of the beginning of the local path) is important
to help users know which files they've already uploaded. If I change the field
to TYPE="text" then the RTL works fine, so it seems to be specific to TYPE="File".

<INPUT TYPE="File" NAME="File01" SIZE="22" CLASS="FormFieldMicroTextBlue"
STYLE="direction: rtl;">

The CLASS setting from the linked CSS file is as follows... it doesn't help to
put "direction: rtl;" into the Style Sheet, though:

.FormFieldMicroTextBlue	{
			font-size: 11px;
			color: blue;
			font-family: Arial, Helvetica, sans-serif;
			}

Not a huge bug perhaps, but in this case it's certainly annoying!


Reproducible: Always
Steps to Reproduce:
1. Go to form with a File input field containing STYLE="direction: rtl;" in it.
2. Choose a file, any file in the field.


Actual Results:  
The text (the file path) starts at the left and scrolls off to the right side,
as it normally does if you don't specify a text direction. This displays only
the beginning part of the file path in the field.


Expected Results:  
The text (the file path) should have been "right justified" so that the end of
the text was always displayed in the field and extra characters are pushed off
to the left (the filename should always remain visible)


about:buildconfig

Build platform
target
i586-pc-msvc

Build tools
Compiler 	Version 	Compiler flags
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TC -nologo -W3 -nologo -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TP -nologo -W3 -nologo -Gy -Fd$(PDBFILE)

Configure arguments
--without-system-jpg --without-system-zlib --enable-extensions=default,irc,tasks
--enable-crypto --disable-auto-deps --disable-debug --enable-optimize=-O1
One more addendum. If I remove the STYLE parameter completely from the INPUT
tag, and put the direction: rtl; into the Style Sheet, then it doesn't fix the
text but it does make the "Browse" box move to the right of the text box
(whereas it normally is to the left.)
Assignee: dbaron → nobody
Component: Style System (CSS) → Layout: Form Controls
QA Contact: ian → core.layout.form-controls
Worksforme with current trunk; see testcase in the URL field.  Does that
testcase also fail for you with 1.7.2?

Note that switching the order of the textfield and the button is in fact
correct.  What you'd doing is rather an abuse of "direction:rtl"...
(In reply to comment #2)
> Worksforme with current trunk; see testcase in the URL field.  Does that
> testcase also fail for you with 1.7.2?
> 
> Note that switching the order of the textfield and the button is in fact
> correct.  What you'd doing is rather an abuse of "direction:rtl"...

That causes the Browse button to appear on the far left, and the text box to
appear on the far right side of the window. But the text itself is still as normal.

If that's a misuse of that parameter, is there any way that could be made to
work? When you're uploading files, it's FAR more useful to see the END of the
path than the beginning, in my opinion. Often you're going to upload multiple
files from one directory, the filenames are the important part. I know it might
not be part of the standards but this functionality would be a huge help in
situations like this I think.
> But the text itself is still as normal.

Odd.  That's not what I'm seeing here with 1.7 on Linux...

> is there any way that could be made to work?

At the moment, no.
This happens on Windows XP too (2005021723).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Anne, why was this confirmed?  As far as I can tell, this bug is invalid...
Because it looks really weird and certainly not correct. The INPUT field of
|type="file"| is aligned right while the button of |type="file"| is aligned left
and the text on that button read "...Browse". That seems wrong.
The text is absolutely correct, given that "direction" is set.

The left/right alignment is a duplicate, I'm pretty sure.
I agree with Boris that this is INVALID or at least WONTFIX. Using direction:
rtl for formatting effects is just wrong IMHO.
Marking so.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
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.