Open Bug 42220 Opened 24 years ago Updated 2 years ago

undo/redo not coalescing properly

Categories

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

defect

Tracking

()

People

(Reporter: Brade, Unassigned)

Details

(Keywords: helpwanted, polish, Whiteboard: EDITORBASE-; 3 days; [behavior])

When I type the following letters:
 bold 
and then press
 command-b (control-b on windows)
and then type the following keys:
 bold
and then press command-b again (to remove the bold state)
and then type the following keys:
 bold

I expect to see bold BOLD bold (where BOLD is actually <b>bold</b>).

I then choose Undo

I expect my last typing of "bold" to be removed.  Instead all of the text I've 
typed is removed.

Possibly related to this is if I redo (after an undo) and continue typing, I 
still undo the insertion of all the text typed

I expect that shortcut keys (like Command-b) and transaction events themselves 
(undo/redo) will break the coalescing of typing.
This is probably due to the fact that we stop coalescing based on editing
actions. In your example, you are hitting control-b while the selection is
collapsed (a caret) so there is no editing action that is triggered. Instead the
type in state is modified so that the next editing action knows what style to
use.

I suppose we should be terminating type in coalescing when the type in state
changes to something different then what was used during the last type in event.
this is per 4.x behavior
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
verified in 6/13 build.
Status: RESOLVED → VERIFIED
reopening bug
Status: VERIFIED → REOPENED
Resolution: INVALID → ---
I'd rather keep this bug around; I don't think it's "invalid."

Resolve it as Later or set it to Milestone Future if we don't aren't going to fix 
it right away.

I believe the reason 4.x works the way it does is because it didn't have multi-
level undo.  We have multi-level undo and should provide the undo/redo at a finer 
level than 4.x did.  Also, I believe Word 97 for Windows works the way I've 
requested.  Sorry I don't have many other applications to compare to at the 
moment.
Target Milestone: --- → M17
I can make it work the way you want, I think, without too much trouble.  The 
issue is whether that's the way we want it to work.  It is a change from 4.x, so 
I believe it calls for extra consideration.
setting keywords,status and milestone
Status: REOPENED → ASSIGNED
Keywords: nsbeta3, polish
Whiteboard: nsbeta3+
Target Milestone: M17 → M18
added correctness and nsbeta3+
Keywords: correctness
Whiteboard: nsbeta3+ → [nsbeta3+]
setting priority in status whiteboard
Priority: P3 → P4
Whiteboard: [nsbeta3+] → [nsbeta3+][p:4]
due to the timeframe and the number of issues that need to be addressed, marking 
this as nsbeta3-, adding helpwanted and moving to future
Keywords: helpwanted
Whiteboard: [nsbeta3+][p:4] → [nsbeta3-]
Target Milestone: M18 → Future
moz 0.9
Target Milestone: Future → mozilla0.9
moving a bunch of 0.9 bugs to 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Keywords: nsbeta3
Whiteboard: [nsbeta3-]
Whiteboard: [behavior]
Target Milestone: mozilla0.9.2 → mozilla1.0
Futuring because I still don't know what the call is on this one.
Target Milestone: mozilla1.0 → Future
MS Word 97 works more like what I want.  I haven't checked other applications 
yet.  

We should change our behavior to be more consistent with Word and other 
applications which allow multiple levels of undo and style changes.  We should 
stop coalescing of typing when the state changes.

Please reconsider for a mozilla 1.x milestone.
OS: Mac System 8.5 → All
Hardware: Macintosh → All
Target Milestone: Future → ---
097
Target Milestone: --- → mozilla0.9.7
Whiteboard: [behavior] → EDITORBASE; 3 days; [behavior]
Target Milestone: mozilla0.9.7 → mozilla0.9.9
Whiteboard: EDITORBASE; 3 days; [behavior] → EDITORBASE-; 3 days; [behavior]
removing EDITORBASE-, is a P4 so it may not be done in time.
Whiteboard: EDITORBASE-; 3 days; [behavior] → EDITORBASE; 3 days; [behavior]
triage team says minus
Whiteboard: EDITORBASE; 3 days; [behavior] → EDITORBASE-; 3 days; [behavior]
the swami says: things that will not land in 099!
Target Milestone: mozilla0.9.9 → mozilla1.0
Moving bugs to Mozilla1.1 that are not EDITORBASE+.
Target Milestone: mozilla1.0 → mozilla1.1
removing myself from the cc list
The days of having a half dozen milestones out in front of us to divide bugs 
between seem to be gone, though I dont know why.  Lumping everything together as 
far out as I can.  I'll pull back things that I am working on as I go.
Target Milestone: mozilla1.1alpha → mozilla1.2beta
[ushing these out as far as bugzilla will let me.  I'll pull them back as I work
on them.
Target Milestone: mozilla1.2beta → mozilla1.4beta
QA Contact: sujay → editor
Assignee: mozeditor → nobody
Status: ASSIGNED → NEW
Target Milestone: mozilla1.4beta → ---

Mass-removing myself from cc; search for 12b9dfe4-ece3-40dc-8d23-60e179f64ac1 or any reasonable part thereof, to mass-delete these notifications (and sorry!)

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.