Closed Bug 106383 Opened 23 years ago Closed 23 years ago

regression: new composer doc behaves as if empty

Categories

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

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: ntz, Assigned: kinmoz)

References

Details

(Whiteboard: [EDITORBASE] QA please verify all dups are fixed too.)

Attachments

(2 files, 1 obsolete file)

With build between 10/19 and 10/23:
1) Create a new blank page in composer.
2) Go to HTML source view.
3) Put some text in the body.
4) Go to Normal view.
5) Attempt to delete some text.

Expected results: Text is deletable.

Actual results: Document behaves as if it is empty.

Pressing CTRL+A selects nothing. If you type something in normal mode,
everything works as expected--additional changes in HTML view are edittable in
normal view.

Perhaps this is a regression from fix to bug 93088. Works fine with 10/19 build.
resaaign to right component
Assignee: ducarroz → kin
Component: Composition → Editor: Core
Product: MailNews → Browser
QA Contact: sheelar → sujay
Confirming bug on trunk build 20011023.  This problem is not reproducible on my
20011022 branch build.  
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can't reproduce this in my 11/05/01 Mozilla Win32 Debug build. Sujay, can you 
try this out in your build? If you don't see it, let's close this out as a 
WORKSFORME.

Nathan, is there is some specific text you are typing in? Are you adding plain 
text or are you adding HTML tags too? I just switch to the HTML source editing 
pane, added "This is a test." before the <br> that was there and switched back 
to normal mode, and was able to edit it.
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: Can't reproduce in 11/05/01 debug build.
Target Milestone: --- → mozilla0.9.7
I am just adding plain text, such as your example. I still observe the bug with 
build 2001110503 win32.
I can reproduce this in 11/2 trunk and 11/6 trunk build.
The problem was that LoadHTML() wasn't clearing out mBogusNode in the rules 
code, so certain operations like DeleteSelection(), SelectAll(), etc thought 
that there was nothing to do because DocumentIsEmpty() was returning true since 
mBogusNode was not null.

Joe, I took a shortcut in Patch Rev 1, and just removed the bogus node when the 
action was kOpHTMLLoad inside of AfterEditInner() ... would you rather that we 
add/call a new WillLoadHTML() method that does this, and add a stub 
DidLoadHTML() method?
Whiteboard: Can't reproduce in 11/05/01 debug build. → FIX IN HAND
Whiteboard: FIX IN HAND → [EDITORBASE] FIX IN HAND
*** Bug 107753 has been marked as a duplicate of this bug. ***
jfrancis - I just attatched a new patch that removes the mBogusNode via the
Will/DidDoAction() mechanism. If it's ok, I will be checking in Patch Rev 2, but
you can review Patch Rev 2b since it ignores the indentation changes I had to
make, which makes it a bit easier to see what my changes were.

Is this something we want to try and get in for 0.9.6 since it's a regression?
Let me know, I'll have to ask drivers.
Whiteboard: [EDITORBASE] FIX IN HAND → [EDITORBASE] FIX IN HAND, need r= and sr=
i think this should go in 096.
Whiteboard: [EDITORBASE] FIX IN HAND, need r= and sr= → [EDITORBASE] FIX IN HAND
Comment on attachment 56955 [details] [diff] [review]
Patch Rev 2b (Same as patch above except with diff -uw output)

r=jfrancis; thanks kin
Attachment #56955 - Flags: review+
Comment on attachment 56955 [details] [diff] [review]
Patch Rev 2b (Same as patch above except with diff -uw output)

sr=sfraser
Attachment #56955 - Flags: superreview+
Whiteboard: [EDITORBASE] FIX IN HAND → [EDITORBASE] FIX IN HAND, ready for checkin
Attachment #56757 - Attachment is obsolete: true
a=asa (on behalf of drivers) for checkin to 0.9.6
Keywords: mozilla0.9.6+
Fix (Patch Rev 2) checked into trunk:

  editor/libeditor/html/nsHTMLDataTransfer.cpp    revision 1.33
  editor/libeditor/html/nsHTMLEditRules.cpp       revision 1.206
  editor/libeditor/html/nsHTMLEditRules.h         revision 1.78
  editor/libeditor/html/nsHTMLEditor.h            revision 1.165
  editor/libeditor/text/nsTextEditRules.h         revision 1.66
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [EDITORBASE] FIX IN HAND, ready for checkin → [EDITORBASE] QA please verify all dups are fixed too.
Target Milestone: mozilla0.9.7 → mozilla0.9.6
verified 2001110903.
Status: RESOLVED → VERIFIED
Has this been checked into the 0.9.6 branch yet?
Yes, it should be on the MOZILLA_0_9_6_BRANCH, I checked it into the TRUNK
before it was branched.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: