Ticket #2042: 2042.patch

File 2042.patch, 1.5 kB (added by fredck, 3 months ago)
  • _whatsnew.html

     
    115115                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1792">#1792</a>] In IE, 
    116116                        the browser was able to enter in an infinite loop when working with multiple editors 
    117117                        in the same page. </li> 
     118                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2042">#2042</a>] The FitWindow 
     119                        command was throwing an error if executed in an editor where its relative button 
     120                        is not present in the toolbar.</li> 
    118121        </ul> 
    119122        <h3> 
    120123                Version 2.6 Beta 1</h3> 
  • editor/_source/classes/fcktoolbarbutton.js

     
    4848 
    4949FCKToolbarButton.prototype.RefreshState = function() 
    5050{ 
     51        var uiButton = this._UIButton ; 
     52 
     53        if ( !uiButton ) 
     54                return ; 
     55 
    5156        // Gets the actual state. 
    5257        var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ; 
    5358 
    5459        // If there are no state changes than do nothing and return. 
    55         if ( eState == this._UIButton.State ) return ; 
     60        if ( eState == uiButton.State ) return ; 
    5661 
    5762        // Sets the actual state. 
    58         this._UIButton.ChangeState( eState ) ; 
     63        uiButton.ChangeState( eState ) ; 
    5964} 
    6065 
    6166FCKToolbarButton.prototype.Click = function()