Opened 10 years ago

Closed 10 years ago

#527 closed Bug (fixed)

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 (2)

comment:1 in reply to: ↑ description Changed 10 years 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 :))

comment:2 Changed 10 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with [345]

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy