Ticket #1474 (closed Bug: fixed)

Opened 2 years ago

Last modified 2 years ago

null errors reloading the page in IE

Reported by: alfonsoml Owned by:
Priority: Normal Milestone: FCKeditor 2.5
Component: General Version: FCKeditor 2.5 Beta
Keywords: Confirmed IE Cc:

Description

Add a smiley to the content in IE 6 and now try to reload the page, a list of errors saying that something is null will show.

This patch (it's missing the reference to this bug number as it still doesn't exists) should take care of them, but maybe there's something else that can be done:

  • classes/fckspecialcombo.js

     
    192192{ 
    193193        this.Enabled = isEnabled ; 
    194194 
    195         this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ; 
     195        // In IE it can happen when the page is reloaded that _OuterTable is null, so check its existence 
     196        if ( this._OuterTable ) 
     197                this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ; 
    196198} 
    197199 
    198200FCKSpecialCombo.prototype.Create = function( targetElement ) 
  • classes/fcktoolbarbuttonui.js

     
    127127 
    128128        var e = this.MainElement ; 
    129129 
     130        // In IE it can happen when the page is reloaded that MainElement is null, so exit here 
     131        if ( !e ) 
     132                return ; 
     133 
    130134        switch ( parseInt( newState, 10 ) ) 
    131135        { 
    132136                case FCK_TRISTATE_OFF : 
  • internals/fckdomtools.js

     
    380380 
    381381        EnforcePaddingNode : function( doc, tagName ) 
    382382        { 
     383                // In IE it can happen when the page is reloaded that doc or doc.body is null, so exit here 
     384                if ( !doc || !doc.body ) 
     385                        return ; 
     386 
    383387                this.CheckAndRemovePaddingNode( doc, tagName, true ) ; 
    384388                if ( doc.body.lastChild && ( doc.body.lastChild.nodeType != 1 
    385389                                || doc.body.lastChild.tagName.toLowerCase() == tagName.toLowerCase() ) ) 

Change History

Changed 2 years ago by martinkou

  • keywords Confirmed added
  • status changed from new to closed
  • resolution set to fixed

I've merged the proposed fix to trunk in [1047].

Interestingly, the bug seems to be related to the popup dialogs. While I can confirm the bug definitely occurs with the 2.5.x branch code, it didn't occur in my local trunk code which uses floating iframes for dialogs (I haven't committed the floating dialog code to trunk yet as I still need to add in the graphics stuff).

Note: See TracTickets for help on using tickets.