Opened 7 months ago
Closed 7 months ago
#22407 closed defect (bug) (fixed)
Undo and redo in TinyMCE are broken after deleting a view
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | 3.5 |
| Component: | Media | Version: | 3.5 |
| Severity: | normal | Keywords: | |
| 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)
comment:2
azaozz
— 7 months 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.
comment:3
koopersmith
— 7 months ago
- Keywords early removed
- Milestone changed from Future Release to 3.5
- Priority changed from normal to low
Moving back to 3.5 and grouping with the rest of the views tickets. When we take a crack at views in the future, we'll create and parcel out tickets from there.
comment:4
koopersmith
— 7 months ago
- Owner set to koopersmith
- Resolution set to fixed
- Status changed from new to closed
In 22567:
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.