Ticket #527 (closed Bug: fixed)

Opened 18 months ago

Last modified 18 months ago

Fail to load in IE if FCKConfig.ToolbarSets has a trailing comma

Reported by: alfonsoml Owned by:
Priority: Normal Milestone: FCKeditor 2.4.3
Component: UI : Toolbar Version: FCKeditor 2.4.2
Keywords: Cc:

Description

If the user customizes the toolbarset and leaves a trailing comma then IE will fail to load the editor.

It can be fixed with

  • editor/_source/internals/fcktoolbarset.js

     
    242242 
    243243                var oToolbar ; 
    244244 
     245                if ( typeof( oToolbarItems ) == 'undefined' ) 
     246                        continue ; 
     247 
    245248                if ( typeof( oToolbarItems ) == 'string' ) 
    246249                { 
    247250                        if ( oToolbarItems == '/' ) 

Is it worth?

I ask this question because people having this problem surely haven't read anything about how to customize the editor, and they should.

(And yes, I wanted to test how to put a patch right here ;-) )

Change History

in reply to: ↑ description   Changed 18 months ago by fredck

  • milestone set to FCKeditor 2.4.3

Nice move Alfonso. Let's help the lazy developers out there.

It can be even simpler, comprehending also cases where, by some coding magic, it returns "null":

  • editor/_source/internals/fcktoolbarset.js

     
    239239        for ( var x = 0 ; x < ToolbarSet.length ; x++ ) 
    240240        { 
    241241                var oToolbarItems = ToolbarSet[x] ; 
     242                 
     243                if ( !oToolbarItems )  
     244                        continue ;  
    242245 
    243246                var oToolbar ; 
    244247 

If you feel ok with it, go ahead committing it.

(And yes, I wanted to test how to put a patch right here ;-) )

I understood it as soon as I saw your ticket :))

  Changed 18 months ago by alfonsoml

  • status changed from new to closed
  • resolution set to fixed

Fixed with [345]

Note: See TracTickets for help on using tickets.