Closed Bug 591988 Opened 14 years ago Closed 14 years ago

Empty first line in text area disappears

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 620267

People

(Reporter: erwin, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4) Gecko/20100818 Firefox/4.0b4
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4) Gecko/20100818 Firefox/4.0b4

Whenever I open a page with a textarea whose contents start with one or more blank lines, those lines disappear (i.e. the textarea immediately skips to the content.)

This doesn't happen if there are spaces or tabs involved - just newlines.


Reproducible: Always

Steps to Reproduce:
1. Open a document with a textarea, which starts with a new line, like such:
<textarea>

This should be line number 2
This should be line number 3</textarea>
Actual Results:  
'This should be line number 2' shows up as the 1st line.

Expected Results:  
There's a blank line inside the textarea, before 'This should be line number 2'.

View source shows it's there, view generated source doesn't.
Component: for this bug should be HTML: Parser

with html5.enable=true
PRE and TEXTAREA elements are discarding all leading newlines

similar bug has google chrome 10, which keeps newlines in textContent but discards one newline in value of textarea
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → parser
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: