Opened 17 years ago

Closed 17 years ago

#527 closed Bug (fixed)

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

Reported by: Alfonso Martínez de Lizarrondo 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 (2)

comment:1 in reply to:  description Changed 17 years ago by Frederico Caldeira Knabben

Milestone: 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 :))

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: newclosed

Fixed with [345]

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy