[IMP] [MONKEY] Re-apply changes introduced at version 3328.
Original commit by chm. [FIX] cleditor: When the DOM is modify, the event resize try to call refresh and refresh has not DOM available. Correction : If the DOM as no prent, don't call refresh. bzr revid: tde@openerp.com-20140305105455-1ewix4pm9m5ob1bm
This commit is contained in:
parent
bff34f4014
commit
17a23c60b8
|
@ -306,8 +306,12 @@
|
||||||
|
|
||||||
// Bind the window resize event when the width or height is auto or %
|
// Bind the window resize event when the width or height is auto or %
|
||||||
if (/auto|%/.test("" + options.width + options.height))
|
if (/auto|%/.test("" + options.width + options.height))
|
||||||
$(window).bind('resize.cleditor', function () { refresh(editor); });
|
$(window).bind('resize.cleditor', function () {
|
||||||
|
// CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor
|
||||||
|
if(editor.$main.parent().parent().size()) {
|
||||||
|
refresh(editor);
|
||||||
|
}
|
||||||
|
});
|
||||||
// Create the iframe and resize the controls
|
// Create the iframe and resize the controls
|
||||||
refresh(editor);
|
refresh(editor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue