Closed Bug 1309582 Opened 8 years ago Closed 8 years ago

When entering an address on one of our customer sites, the lines below the first do not automatically capitalize. This works on chrome and IE

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: david.murray, Assigned: jfkthame)

Details

Attachments

(4 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce:

Simplified html version from our web sites.

<html> 
<head> 
<textarea style="text-transform:capitalize"></textarea> 
</head> 
<body> 
</body> 
</html>

Put in a editor online and typed in words.  


Actual results:

The first line capitalized as expected.

The following lines below, capitalized every word but the first word on the line  


Expected results:

The first word should have capitalized on each line.

This works in chrome and on IE.
confirmed on Firefox 49.0.1 on OSX
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text
Ever confirmed: true
Product: Firefox → Core
Wow, I'm amazed this hasn't been reported before; it looks like a longstanding bug. AFAICS this patch should fix the behavior in this example, but we'll need to test in case it regresses anything else... I've pushed a try job to see how it goes: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2c83cfad536a.
Here's a reftest that exhibits the bug here: we fail to capitalize the first word after each literal newline character.
Attachment #8801346 - Flags: review?(m_kato)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
And a patch that makes it work as expected. (The first version above turned out to affect line-breaking, resulting in a test failure in pre-line-1.html. So this is a more narrowly-focused fix that does not appear to have any unwanted side-effects. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e7697cfb1571d659a75669a3cccc995cc9996f70.)
Attachment #8801348 - Flags: review?(m_kato)
Attachment #8800291 - Attachment is obsolete: true
Attachment #8801348 - Flags: review?(m_kato) → review+
Attachment #8801346 - Flags: review?(m_kato) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/188c504f0fd16587d12cea1ed4879fe44e7bc02c
Bug 1309582 - Reftest for text-transform:capitalize with literal newlines in preformatted text. r=m_kato

https://hg.mozilla.org/integration/mozilla-inbound/rev/9ed78dd58adc11a692ec148b27873430656c409d
Bug 1309582 - For text-transform:capitalize, apply capitalization after a literal newline as well as after a space character. r=m_kato
https://hg.mozilla.org/mozilla-central/rev/188c504f0fd1
https://hg.mozilla.org/mozilla-central/rev/9ed78dd58adc
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: