Closed Bug 209615 Opened 21 years ago Closed 21 years ago

textarea contents misaligned when 'word-spacing' specified on ancestor

Categories

(Core :: Layout: Form Controls, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: nico, Assigned: dbaron)

Details

Attachments

(3 files)

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

When printing a formatted text into a textarea tag(using Courier as font), the
spaces are not the same size as the letters. This ends in a wrong displaying in
the browser. In the source code, everything looks good. The IE displays
everything correct.

Reproducible: Always

Steps to Reproduce:
1. just put a formatted text into a textarea tag, which uses spaces to seperate
the parts, maybe use a table(no html-table!)
Actual Results:  
I saw the bug ;)

Expected Results:  
Display the text-table correctly
Please attach an HTML testcase showing the problem?  How do you know that the
font in the textarea is actually Courier?
<html>
<head>
	<title>company</title>
<link rel="stylesheet" type="text/css" href="basic.css"></head>
<body class="main">
<center><h4>billnr 10001010 vom 17.06.2003</h4></center>
<center><textarea wrap="soft" cols="90" rows="20" name="bill" readonly>
company
name
street 1
21345 zipcode

customer name
street 2
13223 zipcode

billnr: 35001001

Produkt                 Anzahl          Einzelpreis     Summe(in EUR)   MwSt.
-----------------------------------------------------------------------------
sample 1                1               3.5             3.5             16%
=============================================================================
Gesamtbetrag            Nettosumme:     <3.02>          3.5             16%
------------


Vertragsgemäß werden wir den Gesamtbetrag von EUR 3.5 innerhalb der nächsten
Tagen von Ihrem Konto abbuchen.


[Diese Rechnung wurde maschinell erstellt und ist ohne Unterschrift gültig.]


Sollten Sie Fragen zu Ihrer Rechnung haben, dann wenden Sie sich bitte an
billing@company

Mit freundlichen Grüssen,
some name
</textarea></center>
<tr>
	<td>&nbsp;</td>
</tr>
<center><form action="bills.php?action=list_user&user_id=all"
method="Post"><input type="submit" name="send" value="Zurück"></form></center>

</body>
</html>
What're the contents of basic.css?  And please use the "Create a New Attachment"
link above this textarea instead of just pasting large chunks of text into it...
Attached file basic.css
You're right, the fault was the basic.css. Tried it without and it works.
Thanks.
But anyways: the IE displays this code correctly. Is this a bug in Mozilla anyways?
Attachment #125826 - Attachment mime type: text/plain → text/css; charset=iso-8859-1
Attached file HTML testcase
This is the HTML from comment 2, with the stylesheet link changed.
Attached patch patchSplinter Review
Default to 'word-spacing: normal; letter-spacing: normal' on input and
textarea.

(Should we do this on both, or only textarea?)
Attachment #125828 - Flags: superreview?(bzbarsky)
Attachment #125828 - Flags: review?(jkeiser)
Taking.
Assignee: font → dbaron
Status: UNCONFIRMED → NEW
Component: Layout: Fonts and Text → Layout: Form Controls
Ever confirmed: true
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Summary: too long spaces in textarea tag → textarea contents misaligned when 'word-spacing' specified on ancestor
Target Milestone: --- → mozilla1.5alpha
Comment on attachment 125828 [details] [diff] [review]
patch

I'd say both.
Attachment #125828 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 125828 [details] [diff] [review]
patch

agreed
Attachment #125828 - Flags: review?(jkeiser) → review+
Fix checked in to trunk, 2003-06-17 11:01:51 -0700.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: