From e8a7d4fef5f15df2829c161166a41ebce5029bde Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Tue, 9 Apr 2013 18:18:57 +0530 Subject: [PATCH] [FIX]Fixed the issue of cleditor, on window resize blur event not triggered except firefox so due to which value disappears from the container. bzr revid: msh@openerp.com-20130409124857-gqqb87zc6mqk65gy --- addons/web/static/lib/cleditor/jquery.cleditor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/web/static/lib/cleditor/jquery.cleditor.js b/addons/web/static/lib/cleditor/jquery.cleditor.js index e3446991daf..229f69baa66 100644 --- a/addons/web/static/lib/cleditor/jquery.cleditor.js +++ b/addons/web/static/lib/cleditor/jquery.cleditor.js @@ -296,6 +296,12 @@ // Bind the window resize event when the width or height is auto or % if (/auto|%/.test("" + options.width + options.height)) $(window).resize(function() { + //Forcefully blurred iframe contentWindow, chrome, IE, safari doesn't trigger blur on window resize and due to which text disappears + var $frame = editor.$frame[0]; + if(!$.browser.mozilla && $frame.contentWindow){ + var contentWindow = $frame.contentWindow; + $(contentWindow).trigger('blur'); + } // CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor if(editor.$main.parent().parent().size()) { refresh(editor);