Closed Bug 285140 Opened 19 years ago Closed 17 years ago

[FIX]if user stylesheet has "br{ display: none; }", the line of the content of textarea element is not break by LF

Categories

(Core :: DOM: Editor, defect)

x86
All
defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla1.9alpha6

People

(Reporter: masayuki, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

If user stylesheet has following code, the line of the content of textarea
element is not break by LF.

br{
  display: none;
}
the content of textarea should be 

line1
line2
line3
line4
line5

but, if user stylesheet has "br{ display: none; }", it is as following text.

line1line2line3line4line5
Depends on: 240933
OS: Windows 2000 → All
Why are we even applying the user stylesheet to content in a textarea? 
Shouldn't that be anonymous content?
Component: Layout: Block and Inline → Editor
this is a dup, anyway
A dupe of which bug, Hixie?
If I knew which one, I'd have marked it. :-) There is a long standing bug about
<br> and <textarea> though.
Blocks: 320731
QA Contact: layout.block-and-inline → editor
Depends on: 286895
Fixed by checkin for bug 286895.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
No, I can still reproduce this bug.



Status: RESOLVED → REOPENED
Resolution: FIXED → ---
On trunk?
of course, 2007060304 on winxp.
I can't reproduce.  If I add:

  br { display: none }

to my userContent.css, with a trunk build I see no <br> in normal HTML, but I do see linebreaks in the testcase attached to this bug.

Please attach your user stylesheet to the bug?  And double-check that you really are testing a trunk build and not running into xremote or anything like that?
I only added "br {display: none;}" for testing. (my userContent.css only had this rule.)
the screenshot was with safe mode.
How odd.  I can reproduce this with one of my trees, but not another one...

And it definitely should NOT be happening. I wonder what's up.
Oh, I see.  One of my trees doesn't have the <br> in textareas.

So I guess the real issue is that those <br>s are not actually native anonymous.  Fix coming up.
Attached patch Like soSplinter Review
Assignee: nobody → bzbarsky
Status: REOPENED → ASSIGNED
Attachment #267246 - Flags: superreview?(dbaron)
Attachment #267246 - Flags: review?(dbaron)
Summary: if user stylesheet has "br{ display: none; }", the line of the content of textarea element is not break by LF → [FIX]if user stylesheet has "br{ display: none; }", the line of the content of textarea element is not break by LF
Target Milestone: --- → mozilla1.9alpha6
Comment on attachment 267246 [details] [diff] [review]
Like so

r=sr=dbaron if you make the method class-static or file-static -- I don't see why it needs a |this|.
Attachment #267246 - Flags: superreview?(dbaron)
Attachment #267246 - Flags: superreview+
Attachment #267246 - Flags: review?(dbaron)
Attachment #267246 - Flags: review+
Made the method class-static and checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
-> v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: