Ticket #1659: 1659_4.patch

File 1659_4.patch, 1.4 KB (added by Martin Kou, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    242242                                                        body.disabled = true;
    243243                                                        body.contentEditable = true;
    244244                                                        body.removeAttribute( 'disabled' );
     245
     246                                                        // #1659: Editing area should fill the editable frame in IE (IE7+ part).
     247                                                        if ( CKEDITOR.env.version >= 7 && domDocument.compatMode == 'CSS1Compat' )
     248                                                        {
     249                                                                var resizeFunc = CKEDITOR.tools.bind( function()
     250                                                                        {
     251                                                                                this.body.runtimeStyle.minHeight = ( this.documentElement.clientHeight - 22 ) + 'px';
     252                                                                        }, domDocument );
     253
     254                                                                domWindow.attachEvent( 'onresize', resizeFunc );
     255                                                                resizeFunc();
     256                                                        }
    245257                                                }
    246258                                                else
    247259                                                        domDocument.designMode = 'on';
     
    295307                                                                }
    296308                                                        },
    297309                                                        0 );
     310
     311                                                // Avoid memory leaks - we're dealing with raw DOM nodes here.
     312                                                body = null;
    298313                                        };
    299314
    300315                                        editor.addMode( 'wysiwyg',
     
    413428                                        editor.on( 'insertHtml', onInsertHtml, null, null, 20 );
    414429                                        editor.on( 'insertElement', onInsertElement, null, null, 20 );
    415430                                });
     431
     432                        // #1659: Editing area should fill the editable frame in IE.
     433                        if ( CKEDITOR.env.ie )
     434                                editor.addCss( 'body{ margin: 0px; height: 100%; } html{ padding: 10px; }' );
    416435                }
    417436        });
    418437})();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy