[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
This commit is contained in:
Mohammed Shekha 2013-04-09 18:18:57 +05:30
parent 905d13671b
commit e8a7d4fef5
1 changed files with 6 additions and 0 deletions

View File

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