[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
This commit is contained in:
Thibault Delavallée 2014-03-05 11:59:22 +01:00
parent cc23ddd0ce
commit 5c45aac7ef
1 changed files with 5 additions and 0 deletions

View File

@ -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);