Ticket #1838: 1838.patch

File 1838.patch, 2.0 KB (added by Martin Kou, 16 years ago)
  • _whatsnew.html

     
    5858                        mode.</li>
    5959                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1934">#1934</a>] Fixed
    6060                        JavaScript errors when calling Selection.EnsureSelection() in dialogs.</li>
     61                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1838">#1838</a>] Fixed the
     62                        issue where context menus sometimes don't disappear after selecting an option.
     63                        </li>
    6164        </ul>
    6265        <h3>
    6366                Version 2.6 Beta 1</h3>
  • editor/_source/classes/fckpanel.js

     
    270270                                top             : y + 'px'
    271271                        } ) ;
    272272
     273                // Move the focus to the IFRAME so we catch the "onblur".
     274                this._IFrame.width = this._IFrame.height = 2 ;
     275                this._IFrame.contentWindow.focus() ;
     276                this._IsOpened = true ;
     277
     278                // Fix for #1514: The color panels are sometimes too small when they're opened.
     279                // A delayed resize is needed to get the correct sizes.
    273280                var me = this ;
    274281                var resizeFunc = function()
    275282                {
     
    277284                        var iHeight = eMainNode.offsetHeight ;
    278285                        me._IFrame.width = iWidth ;
    279286                        me._IFrame.height = iHeight ;
    280 
    281                         // Move the focus to the IFRAME so we catch the "onblur".
    282                         me._IFrame.contentWindow.focus() ;
    283                         me._IsOpened = true ;
     287                        me._resizeTimer = null ;
    284288                }
    285                 setTimeout( resizeFunc, 1 ) ;
     289                this._resizeTimer = setTimeout( resizeFunc, 1 ) ;
    286290
    287291                FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ;
    288292        }
     
    308312                this._IFrame.width = this._IFrame.height = 0 ;
    309313
    310314                this._IsOpened = false ;
     315                if ( this._resizeTimer )
     316                {
     317                        clearTimeout( this._resizeTimer ) ;
     318                        this._resizeTimer = null ;
     319                }
    311320
    312321                if ( this.ParentPanel )
    313322                        this.ParentPanel.Unlock() ;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy