Edit field line break didn't updated

VERIFIED FIXED in mozilla0.9.6



17 years ago
16 years ago


(Reporter: Anton, Assigned: kinmoz)


Windows 2000

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [EDITORBASE] [CANDIDATE_094] Fixed on trunk., URL)


(2 attachments)

543 bytes, text/html
1.69 KB, patch
Joe Francis
: review+
Simon Fraser
: superreview+
Details | Diff | Splinter Review


17 years ago
after javascript:paste('something') it didn't place cursor to next line
automaticaly , but after pressing any key it do.
I can't reproduce the problem (some clear steps on how to reproduce would be
nice) but sounds like bug 104674

Comment 2

17 years ago
Assignee: asa → kin
Component: Browser-General → Editor: Core
QA Contact: doronr → sujay

Comment 3

17 years ago
May be this bug like 104674, i'm not sure

This UBB forum have nice future - by click on name of poster you can quick
insert it's name with 'bold ubb-code' ( like: [b]Name[/b] ).
UBB try to insert this name in new string and break line to the next, but
Mozilla sometimes insert name not on new string , sometimes dosn't break line.
Usualy this happens on first line of edit area

Yet another bug: then i was writing this text , ENTER not always break to next
line , but after press it one more it did two new lines( always happens if you
move cursor from end of text , and then return )

Comment 4

17 years ago
This is happening because we only create one BR per '\n' character when
inserting the text.

I made a quick patch that inserts an extra BR if the '\n' character is the last
one in the string being inserted, and it fixes the problem ... though I need to
modify the patch so that the extra BR is a _moz BR so that it doesn't get
written out when retrieving the value of the text widget.
Ever confirmed: true
Priority: -- → P3
Whiteboard: EDITORBASE 1 day;
Target Milestone: --- → mozilla0.9.6

Comment 5

17 years ago
Created attachment 54280 [details]
Test Case

Comment 6

17 years ago
Ok , match beter :)
But sometimes it insert two \n ( happen then you have text with scroll bar , 
if you have text in last line (no new blank line at the end ) and you modify
something in the top of the text ( for example add new line in the begining of
text ) and after that you try to add line at the end of text - it make two lines

ps: sorry for my poor english

Comment 7

17 years ago
Created attachment 54540 [details] [diff] [review]
Patch Rev 1

Comment 8

17 years ago
Ok I just attatched what I think is the fix for this bug. jfrancis can tell me 
if it's bogus or not, or if I should be doing the fix somewhere else.

I basically add a mozBR when there is a newline at the very end of the the 
string we are inserting *and* we are inserting after the last node in the 
content tree.


17 years ago
Whiteboard: EDITORBASE 1 day; → [EDITORBASE] FIX IN HAND, need r= and sr=

Comment 9

17 years ago
Comment on attachment 54540 [details] [diff] [review]
Patch Rev 1

looks good kin.  r=jfrancis
Attachment #54540 - Flags: review+

Comment 10

17 years ago
Cc sfraser@netscape.com for sr=.
Whiteboard: [EDITORBASE] FIX IN HAND, need r= and sr= → [EDITORBASE] FIX IN HAND, need sr=

Comment 11

17 years ago
Comment on attachment 54540 [details] [diff] [review]
Patch Rev 1

Attachment #54540 - Flags: superreview+


17 years ago
Summary: Edit field line brake didn't updated → Edit field line break didn't updated


17 years ago
Whiteboard: [EDITORBASE] FIX IN HAND, need sr= → [EDITORBASE] FIX IN HAND, ready for checkin

Comment 12

17 years ago
Fix checked into TRUNK:

    mozilla/editor/libeditor/text/nsTextEditRules.cpp  revision 1.154

Should appear in 10/26/01 QA builds after 7:30am pdt.
Last Resolved: 17 years ago
Keywords: vtrunk
Resolution: --- → FIXED
Whiteboard: [EDITORBASE] FIX IN HAND, ready for checkin → [EDITORBASE] [CANDIDATE_094] Fixed on trunk.

Comment 13

16 years ago
Anton,  does this work for you now?

Comment 14

16 years ago
looks like all ok :)

Comment 15

16 years ago
You need to log in before you can comment on or make changes to this bug.