Opened 12 years ago
Closed 12 years ago
#11179 closed Bug (fixed)
editor.destroy() does not cleanup content generated by TableResize plugin for inline editors
| Reported by: | Teresa Monahan | Owned by: | Piotr Jasiun |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.3.1 |
| Component: | General | Version: | 4.0 Beta |
| Keywords: | IBM | Cc: | Satya Minnekanti, Irina, peter |
Description
To Reproduce:
- Copy inline_destroy.html (attached) into a build where the tableresize plugin is available and open it in a browser.
- Click inside the editor and resize a table column (or hover over the column boundaries so that the resizer icon is displayed).
- Inspect the HTML for the page and see that the tableresize plugin has added an element, e.g.
{{{<div contenteditable="false" style="position: absolute; cursor: col-resize; opacity: 0; padding: 0px; background-color: rgb(0, 0, 68); background-image: none; border: 0px none; z-index: 10; width: 3px; height: 49px; left: 272px; top: 213.867px; display: none;" unselectable="on" data-cke-temp="1"></div>
}}}
- Click the 'Destroy Editor' button.
Problem: Inspect the HTML for the page again and see that the element added by the tableresize plugin is still present.
If you then click the 'Create Inline Editor' button to recreate the editor, and resize a table column again, the tableresize plugin adds a new element to the DOM. The old element is redundant and should be removed from the DOM when the editor is destroyed - see attached tableresize_destroy.gif.
Attachments (2)
Change History (10)
Changed 12 years ago by
| Attachment: | inline_destroy.html added |
|---|
Changed 12 years ago by
| Attachment: | tableresize_destroy.gif added |
|---|
comment:1 Changed 12 years ago by
| Milestone: | → CKEditor 4.3.1 |
|---|
comment:2 Changed 12 years ago by
| Status: | new → confirmed |
|---|---|
| Version: | 4.3.1 (GitHub - master) → 4.0 Beta |
Problem can be reproduced from CKEditor 4.0 beta
comment:3 Changed 12 years ago by
| Owner: | set to Piotr Jasiun |
|---|---|
| Status: | confirmed → assigned |
comment:4 Changed 12 years ago by
| Status: | assigned → review |
|---|
I've added code which remove resizer when editor is destroyed. Changes in t/11179 and corresponding test branch.
comment:5 follow-up: 6 Changed 12 years ago by
| Status: | review → review_failed |
|---|
document.find()could be used in tests instead of checking all divs.- There's a code style issue in tests (missing semicolon after
count++). - Tests are not executed in strict mode.
- Why do you add stylesheetparser and wysiwygarea plugins in tests?
comment:6 Changed 12 years ago by
| Status: | review_failed → review |
|---|
Replying to Reinmar:
document.find()could be used in tests instead of checking all divs.
You're right. I thought that attribute selectors are not supported in IE8, but it looks they work pretty well.
- Tests are not executed in strict mode.
Added.
- Why do you add stylesheetparser and wysiwygarea plugins in tests?
Because these tests does not work in without it.
comment:7 Changed 12 years ago by
| Status: | review → review_passed |
|---|
comment:8 Changed 12 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
- git:ab49df9
- tests:b9f79a8

I haven't yet checked this TC, but it seems to be very likely given the changes in 4.3.