Skip to content

Commit ab49df9

Browse files
author
Piotr Jasiun
committed
Merge branch 't/11179'
2 parents 4f674e7 + 0889921 commit ab49df9

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Fixed Issues:
2929
* [#11042](http://dev.ckeditor.com/ticket/11042): Fixed: Selection made on element containing non-editable element was not auto faked.
3030
* [#11042](http://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and combo items will now cycle.
3131
* [#11011](http://dev.ckeditor.com/ticket/11011): Fixed: Method applyStyle removes attributes from nested elements.
32+
* [#11179](http://dev.ckeditor.com/ticket/11179): Fixed: editor.destroy() does not cleanup content generated by [TableResize plugin](http://ckeditor.com/addon/tableresize) for inline editors.
3233

3334
## CKEditor 4.3
3435

plugins/tableresize/plugin.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* For licensing, see LICENSE.md or http://ckeditor.com/license
44
*/
55

6-
(function() {
6+
( function() {
77
var pxUnit = CKEDITOR.tools.cssLength,
88
needsIEHacks = CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks );
99

@@ -96,7 +96,7 @@
9696

9797
// The pillar should reflects exactly the shape of the hovered
9898
// column border line.
99-
pillars.push({
99+
pillars.push( {
100100
table: table,
101101
index: pillarIndex,
102102
x: pillarLeft,
@@ -257,6 +257,11 @@
257257
'style="position:absolute;cursor:col-resize;filter:alpha(opacity=0);opacity:0;' +
258258
'padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"></div>', document );
259259

260+
// Clean DOM when editor is destroyed.
261+
editor.on( 'destroy', function() {
262+
resizer.remove();
263+
} );
264+
260265
// Except on IE6/7 (#5890), place the resizer after body to prevent it
261266
// from being editable.
262267
if ( !needsIEHacks )
@@ -275,12 +280,12 @@
275280

276281
pillar = targetPillar;
277282

278-
resizer.setStyles({
283+
resizer.setStyles( {
279284
width: pxUnit( targetPillar.width ),
280285
height: pxUnit( targetPillar.height ),
281286
left: pxUnit( targetPillar.x ),
282287
top: pxUnit( targetPillar.y )
283-
});
288+
} );
284289

285290
// In IE6/7, it's not possible to have custom cursors for floating
286291
// elements in an editable document. Show the resizer in that case,
@@ -382,9 +387,9 @@
382387
!resizer && ( resizer = new columnResizer( editor ) );
383388
resizer.attachTo( pillar );
384389
}
385-
});
386-
});
390+
} );
391+
} );
387392
}
388-
});
393+
} );
389394

390-
})();
395+
} )();

0 commit comments

Comments
 (0)