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
\r
// Bind the window resize event when the width or height is auto or %\r
if (/auto|%/.test("" + options.width + options.height))\r
- $(window).bind('resize.cleditor', function () { refresh(editor); });\r
-\r
+ $(window).bind('resize.cleditor', function () {\r
+ // CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor\r
+ if(editor.$main.parent().parent().size()) {\r
+ refresh(editor);\r
+ }\r
+ });\r
// Create the iframe and resize the controls\r
refresh(editor);\r
\r