Closed Bug 81227 Opened 23 years ago Closed 23 years ago

Switch to HTML mode and back to normal generates 3 Undo transactions

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: glazou, Assigned: cmanske)

References

Details

Attachments

(2 files)

a) open a new Composer window
b) switch to HTML mode
c) switch back to normal mode
d) dump Undo stack

result :

---------------------- BEGIN UNDO STACK DUMP
<!-- Bottom of Stack -->
+ SetDocTitleTxn:
|    + InsertElementTxn
+ PlaceholderTxn:
+ SetDocTitleTxn:
|    + InsertElementTxn
<!--  Top of Stack  -->
Num Undo Items: 3
---------------------- END   UNDO STACK DUMP

I think that 3 is a lot... I detected that in the CSSization of Composer because
I was setting a bgcolor, looking at the markup and trying to Undo, without
success.

I don't think that moving from normal to HTML mode should generate a Txn ; and
I can understand than switching back generates one and only Txn.

But why 3 ?-) And why does it set the title ?
Fix is ready. Benefits are great:
If no change is made in HTML Source, we don't generate any transactions, and
thus we can retain the selection in Normal mode. Thus HTML source can be used
to view your document source, and returning to normal is much faster (doesn't
bother to rebuild the document. Also, the document modified state is now known
correctly, so we don't have to force it to be "dirty" when editing source, as we
do now.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Attached patch FixSplinter Review
Keywords: patch, review
Whiteboard: FIX IN HAND need r=, sr=
*** Bug 66249 has been marked as a duplicate of this bug. ***
Blocks: 66249
r=mjudge, sr=kin
Whiteboard: FIX IN HAND need r=, sr= → FIX IN HAND
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND
Hi Daniel,

if you can please verify this one in latest build and mark verified-fixed..

thanks.
verified in windows and linux 20010625 builds
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: