Opened 12 years ago
Closed 12 years ago
#22407 closed defect (bug) (fixed)
Undo and redo in TinyMCE are broken after deleting a view
Reported by: | azaozz | Owned by: | koopersmith |
---|---|---|---|
Milestone: | 3.5 | Priority: | low |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
As the title. To reproduce:
- Add an image or a gallery to a post using the Add Media button.
- Click on it to select it and delete it (with the backspace or delete key).
- Press Crtl+Z or click on the Undo button in the editor.
Attachments (1)
Change History (5)
#2
@
12 years ago
- Keywords early added
- Milestone changed from 3.5 to Future Release
- Priority changed from high to normal
- Severity changed from blocker to normal
Leaving for 3.6 after discussing in IRC.
Note: See
TracTickets for help on using
tickets.
22407.patch seems to work well (still includes some debug code for testing). It converts all views to their text mode before adding new undo level in TinyMCE and converts them back to dom nodes when doing redo.
In addition it adds another step when deleting a view, so deleting now does:
This introduces quite a bit of overhead on adding new undo levels in TinyMCE (which happens pretty often, like on every new paragraph or on node changes), but seems to work well with contenteditable=false nodes.