From 5c45aac7ef9df8f2f0d2aeb213813a99dfb2a8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 5 Mar 2014 11:59:22 +0100 Subject: [PATCH] [IMP] [MONKEY] Re-apply changes introduced at version 3755. This commit was a forward-pord of saas-1 commits. Commit by msh [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: tde@openerp.com-20140305105922-cqw9vrvk306jynco --- addons/web/static/lib/cleditor/jquery.cleditor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/static/lib/cleditor/jquery.cleditor.js b/addons/web/static/lib/cleditor/jquery.cleditor.js index e11d1b15986..cf98288d6c6 100644 --- a/addons/web/static/lib/cleditor/jquery.cleditor.js +++ b/addons/web/static/lib/cleditor/jquery.cleditor.js @@ -307,6 +307,11 @@ // Bind the window resize event when the width or height is auto or % if (/auto|%/.test("" + options.width + options.height)) $(window).bind('resize.cleditor', function () { + //Forcefully blurred iframe contentWindow, chrome, IE, safari doesn't trigger blur on window resize and due to which text disappears + var contentWindow = editor.$frame[0].contentWindow; + if(!$.browser.mozilla && contentWindow){ + $(contentWindow).trigger('blur'); + } // CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor if(editor.$main.parent().parent().size()) { refresh(editor);