Ticket #4459: 4459_2.patch

File 4459_2.patch, 2.6 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/maximize/plugin.js

     
    211211
    212212                                                        // Add cke_maximized class.
    213213                                                        container.addClass( 'cke_maximized' );
     214                                                        container.iframeShim();
    214215                                                }
    215216                                                else if ( this.state == CKEDITOR.TRISTATE_ON )  // Restore from fullscreen if the state is on.
    216217                                                {
     
    239240
    240241                                                        // Remove cke_maximized class.
    241242                                                        container.removeClass( 'cke_maximized' );
     243                                                        container.iframeShim();
    242244
    243245                                                        // Emit a resize event, because this time the size is modified in
    244246                                                        // restoreStyles.
  • _source/core/dom/element.js

     
    14371437                                        if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) )
    14381438                                                event.data.preventDefault();
    14391439                                } );
    1440                 }
     1440                },
     1441
     1442                /**
     1443                 * Adding an iframe shim to this element, OR removing the existing one if already applied.
     1444                 * Note: This will only affect IE version below 7.
     1445                 */
     1446                iframeShim : function()
     1447                {
     1448                        if ( CKEDITOR.env.ie && CKEDITOR.env.ie.version > 6 )
     1449                                return false;
     1450
     1451                        var existingShim;
     1452                        if ( existingShim = this.getCustomData( 'cke_iframe_shim' ) )
     1453                        {
     1454                                this.removeCustomData( 'cke_iframe_shim' );
     1455                                this.getDocument().getById( existingShim ).remove();
     1456                                return true;
     1457                        }
     1458                       
     1459                        var id = 'cke_iframe_shim_' + CKEDITOR.tools.getNextNumber(),
     1460                                        shim = '<iframe id="' + id + '" frameborder="0" tabindex="-1"' +
     1461                                                ' src="javascript:' +
     1462                                                   'void((function(){' +
     1463                                                           'document.open();' +
     1464                                                           ( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + this.getDocument().$.domain + '\';' : '' ) +
     1465                                                           'document.close();' +
     1466                                                   '})())"' +
     1467                                                ' style="display:block;position:fixed;z-index:-1;' +
     1468                                                'top:expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\');' +
     1469                                                'left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\');' +
     1470                                                'width:expression(this.parentNode.offsetWidth+\'px\');' +
     1471                                                'height:expression(this.parentNode.offsetHeight+\'px\');' +
     1472                                                   'progid:DXImageTransform.Microsoft.Alpha(opacity=0);' +
     1473                                                '"></iframe>';
     1474
     1475
     1476                        this.setCustomData( 'cke_iframe_shim', id );
     1477                        return this.append( CKEDITOR.dom.element.createFromHtml( shim ), true );
     1478                }
    14411479        });
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy