Ticket #4084: 4084_2.patch

File 4084_2.patch, 2.3 KB (added by Tobiasz Cudnik, 15 years ago)
  • CHANGES.html

     
    162162                        ckeditor2.html test case.</li>
    163163                <li><a href="http://dev.fckeditor.net/ticket/3989">#3989</a> : Host page horizontal scrolling a lot when on having righ-to-left direction.</li>
    164164                <li><a href="http://dev.fckeditor.net/ticket/4001">#4001</a> : Create link around existing image result incorrect.</li>
     165                <li><a href="http://dev.fckeditor.net/ticket/4084">#4084</a> : In Firefox image dialog using Kama skin was sticked to left viewport border.</li>
    165166        </ul>
    166167        <h3>
    167168                CKEditor 3.0 RC</h3>
  • _source/plugins/dialog/plugin.js

     
    642643                        this._.hasFocus = false;
    643644
    644645                        // Rearrange the dialog to the middle of the window.
    645                         CKEDITOR.tools.setTimeout( function()
    646                                 {
    647                                         var viewSize = CKEDITOR.document.getWindow().getViewPaneSize();
    648                                         var dialogSize = this.getSize();
     646                        var viewSize = CKEDITOR.document.getWindow().getViewPaneSize();
    649647
    650                                         this.move( ( viewSize.width - dialogSize.width ) / 2, ( viewSize.height - dialogSize.height ) / 2 );
     648                        // We're using definition size for initial position because of
     649                        // offten corrupted data in offsetWidth at this point. (#4084)
     650                        this.move( ( viewSize.width - definition.minWidth ) / 2, ( viewSize.height - definition.minHeight ) / 2 );
    651651
    652                                         this.parts.dialog.setStyle( 'visibility', '' );
     652                        this.parts.dialog.setStyle( 'visibility', '' );
    653653
    654                                         // Execute onLoad for the first show.
    655                                         this.fireOnce( 'load', {} );
    656                                         this.fire( 'show', {} );
     654                        // Execute onLoad for the first show.
     655                        this.fireOnce( 'load', {} );
     656                        this.fire( 'show', {} );
    657657
    658                                         // Save the initial values of the dialog.
    659                                         this.foreach( function( contentObj ) { contentObj.setInitValue && contentObj.setInitValue(); } );
    660 
    661                                 },
    662                                 100, this );
    663                 },
     658                        // Save the initial values of the dialog.
     659                        this.foreach( function( contentObj ) { contentObj.setInitValue && contentObj.setInitValue(); } );
     660                },
    664661
    665662                /**
    666663                 * Executes a function for each UI element.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy