Closed Bug 104692 Opened 23 years ago Closed 23 years ago

Edit field line break didn't updated

Categories

(Core :: DOM: Editor, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: anton, Assigned: kinmoz)

References

()

Details

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

Attachments

(2 files)

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
->reassign.
Assignee: asa → kin
Component: Browser-General → Editor: Core
QA Contact: doronr → sujay
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 )
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.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3
Whiteboard: EDITORBASE 1 day;
Target Milestone: --- → mozilla0.9.6
Attached file Test Case
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
Attached patch Patch Rev 1Splinter Review
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.
Whiteboard: EDITORBASE 1 day; → [EDITORBASE] FIX IN HAND, need r= and sr=
Comment on attachment 54540 [details] [diff] [review]
Patch Rev 1

looks good kin.  r=jfrancis
Attachment #54540 - Flags: review+
Cc sfraser@netscape.com for sr=.
Whiteboard: [EDITORBASE] FIX IN HAND, need r= and sr= → [EDITORBASE] FIX IN HAND, need sr=
Comment on attachment 54540 [details] [diff] [review]
Patch Rev 1

sr=sfraser
Attachment #54540 - Flags: superreview+
Summary: Edit field line brake didn't updated → Edit field line break didn't updated
Whiteboard: [EDITORBASE] FIX IN HAND, need sr= → [EDITORBASE] FIX IN HAND, ready for checkin
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.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: vtrunk
Resolution: --- → FIXED
Whiteboard: [EDITORBASE] FIX IN HAND, ready for checkin → [EDITORBASE] [CANDIDATE_094] Fixed on trunk.
Anton,  does this work for you now?
looks like all ok :)
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: