Open Bug 236183 Opened 20 years ago Updated 3 years ago

Editor: Midas - undo does not remove tables or layers

Categories

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

x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: osavill, Unassigned)

Details

Attachments

(1 file)

User-Agent:       
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040301

Using the Midas demo (http://www.mozilla.org/editor/midasdemo/) or my adaptation
(http://www.moretonhallvets.co.uk/admin/nbSubmis.php) insert a table or a layer. 
  Pressing undo does not remove either of them.

Table or layer insertion appears to empty the undo buffer. Enter some text,
insert a table or layer, enter some more text.
  Pressing undo undoes all actions back to the point where the table / layer was
inserted.

Now manually delete the layer / table.
  Undo brings the layer back.
  Redo removes it again !!!

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
move unconfirmed midas bugs
Assignee: general → mozeditor
Component: Browser-General → Editor: Core
QA Contact: general → bugzilla
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This problem still exists. 
QA Contact: bugzilla → editor
Assignee: mozeditor → nobody
Attached file test case
I've looked into this issue.  The apparent problem stems from the Midas Demo editor directly modifying the DOM tree of the editing document.  As it is simply a DOM modification, the transaction manager (undo stack) is unaffected.  This is true for every direct DOM modification.  For example, inserting an image into the editor by appending an img element to the body would not be undoable.

The new attachment demonstrates this by providing two ways to insert a table, and two ways to insert an image.  The "Insert [Table|Img] w/ dom" buttons directly modify the DOM tree of the editor, and therefore the actions cannot be altered by undo/redo.  On the other hand, the "Insert [Table|Img] w/ inserthtml" buttons use execCommand to insert new HTML, and therefore *can* be altered by undo/redo as one would expect.

In summary, the bug here is that DOM modifications are not tracked by the transaction manager of the editor.  However, I am not sure whether this is by design, or simply omitted.  Does anyone have any thoughts on this?
Internet Explorer appears to share the same behavior as Mozilla -- if the DOM tree is modified directly, the undo/redo functions do not record it.

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

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

Attachment

General

Created:
Updated:
Size: