bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

textarea inherits align="center" from parent td




Layout: Form Controls
18 years ago
17 years ago


(Reporter: Karl Johan Kleist, Assigned: Pierre Saslawsky)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: Suggest fix to WG., URL)


(2 attachments)



18 years ago
The text in the input field becomes centered.

Possible cause: The "td" element which is the parent to
the "textarea" element has the "align" attribute set to "center".

This is hardly the desired effect of this attribute, the text should
be left-aligned (as it is in Netscape 4.7 / Opera 3.62 / IE 5).

Comment 1

18 years ago
Still looking at what might be causing this one - CC'in Mike in case he knows, 
but I'm seeing it on NT too.
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: "textarea" seems to inherit ' align="center" ' from parent "td" → "textarea" seems to inherit ' align="center" ' from parent "td"

Comment 2

18 years ago
This is probably being inherited because align=center is mapped into text-align 
css attribute in MapAttributesInto for nsHTMLTableCellElement.  Somehow it looks 
like this css is getting inherited into the table.

Handing of to Mike and CC'ing Pierre in case he has some insight.
Assignee: clayton → mjudge
Component: Layout → HTML Form Controls
Summary: "textarea" seems to inherit ' align="center" ' from parent "td" → textarea inherits align="center" from parent td

Comment 3

18 years ago
Text fields should not inherit the text-align property. Their alignment should be 
reset to the default for the current direction ('ltr' or 'rtl').

Reassigned to rods.
Assignee: mjudge → rods

Comment 4

18 years ago
I think this is an editor issue, reassigning
Assignee: rods → beppe

Comment 5

18 years ago
giving this one to Simon to see if he can help resolve the issue
Assignee: beppe → sfraser
Target Milestone: --- → M18

Comment 6

18 years ago
Huh? This isn't anything to do with me.
Assignee: sfraser → beppe

Comment 7

18 years ago
Reassign to mjudge@netscape.com. This is fallout from Ender-Lite. The old 
heavy-weight text widgets had a similar problem, but buster@netscape.com fixed 
Assignee: beppe → mjudge

Comment 8

18 years ago
Cc'ing kin@netscape.com
Perhaps this fix should be either:
 1) quirks-mode only, or
 2) in ua.css, so the author can override it if desired

Comment 10

18 years ago
SImon I gave it to you for load balancing of the bugs, but that's ok

Comment 11

18 years ago
beppe: my sloughing off of this bug was probably a bit premature. But now that 
ender-light is on, I don't think that there is any editor-specific code that 
deals with styling the text field contents; this should all happen within layout. 
So I think this bug needs to go back to them.

Comment 12

18 years ago
I'm taking it back. I'll look into DBaron's suggestion of fixing it in ua.css. 
Note to self: check the result when editing centered static fields in Composer.
Assignee: mjudge → pierre

Comment 13

18 years ago
FWIW, This also impacts Zope pretty badly - it renders
the textareas that are used heavily almost unusable.

Comment 14

18 years ago
David & Ian: I propose to fix this by adding a '-moz-default' value to the 
'text-align' property in order to reset the alignement (left or right) according 
to the direction (ltr or rtl). Instead of using '-moz-default', we could also 
support 'default' and ask the WG what they think.

In html.css, the INPUT element defines 'text-align:left'. A cheap way of fixing 
the bug would have been to do the same thing for TEXTAREA elements and let the 
i18n folks deal with the problem in r-t-l systems.

Comment 15

18 years ago
Created attachment 10792 [details] [diff] [review]
proposed fix

Comment 16

18 years ago
Created attachment 10793 [details]
another testcase
-moz-default sounds good to me, we should also suggest it for CSS3.
Whiteboard: Suggest fix to WG.

Comment 18

18 years ago
Fix checked in:
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 19

18 years ago
How is this different from Bug 46987?  If it isn't, this has regressed.

Comment 20

18 years ago
I'm running M17 of the missing build id, but help/about gives me
Mozilla/5.0 (X11; U; Linux 2.2.16-3 i686; en-US; m17) Gecko/20000807
this wasn't checked into the m17 branch or something? I still have this problem
and yeah, bug 46987 looks awful familiar

Comment 21

18 years ago
Change QA contact to ckritzer@netscape.com
QA Contact: petersen → ckritzer

Comment 22

18 years ago
Updating QA contact.
QA Contact: ckritzer → bsharma

Comment 23

17 years ago
Verified Build 2001081303 os:win95,mac8.6,winNT
You need to log in before you can comment on or make changes to this bug.