Ticket #2525 (closed Bug: fixed)

Opened 19 months ago

Last modified 17 months ago

Chrome: error if FCKConfig.StartupShowBlocks = true

Reported by: fournaise Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.6.4
Component: General Version: FCKeditor 2.6.3 Beta
Keywords: Confirmed Chrome Firefox Review+ Cc: alexandre@…

Description (last modified by martinkou) (diff)

Hello, If you execute FCKEditor on Google Chrome on the latest trunk (seem appear in the 2.6.3), I have an error if FCKConfig.StartupShowBlocks is set to true.

Uncaught TypeError: Cannot read property 'nodeType' of null http://127.0.0.1/www.lib/fckeditor/edit ... wblocks.js (line 59)
[...]
if ( FCKBrowserInfo.IsIE )
{
try
{
FCK.EditorDocument.selection.createRange().select() ;
}
catch ( e )
{}
}
else
{
var focus = FCK.EditorWindow.getSelection().focusNode ;
if ( focus.nodeType != 1 )
Uncaught TypeError: Cannot read property 'nodeType' of null
focus = focus.parentNode ;
FCKDomTools.ScrollIntoView( focus, false ) ;
}
[...]

To fix the problem I have just added "try catch" in the "else" branch.

regards Frederic

Attachments

2525.patch Download (1.3 KB) - added by martinkou 18 months ago.

Change History

Changed 19 months ago by fournaise

file is fckeditor/editor/_source/commandclasses/fckshowblocks.js (line 59)

Changed 18 months ago by arczi

  • keywords Confirmed Chrome added
  • version changed from SVN to FCKeditor 2.6.3 Beta
  • milestone FCKeditor 2.6.4 deleted

Confirmed. Google Chrome 0.2.149

Uncaught TypeError: Cannot read property 'nodeType' of null http://localhost/edytor/FCKeditor/tags/2.6.3/editor/_source/commandclasses/fckshowblocks.js (line 59)

Changed 18 months ago by aplennevaux

  • cc alexandre@… added
  • keywords Firefox added
  • summary changed from Google Chrome bug if FCKConfig.StartupShowBlocks is set to true. to Google Chrome AND Firefox bug if FCKConfig.StartupShowBlocks is set to true.
  • version changed from FCKeditor 2.6.3 Beta to FCKeditor 2.6.3
  • priority changed from Normal to High

I also have this issue in Firefox 3. It provokes this message:

Error : FCK.EditorWindow.getSelection() is null Source file :  http://localhost/lab-au.com/dev/_js/_FCKeditor/editor/js/fckeditorcode_gecko.js Line : 71FCKSelection.GetSelection()

Disabling the option disables the bug.

Changed 18 months ago by fredck

  • priority changed from High to Normal
  • summary changed from Google Chrome AND Firefox bug if FCKConfig.StartupShowBlocks is set to true. to Chrome: error if FCKConfig.StartupShowBlocks = true
  • version changed from FCKeditor 2.6.3 to FCKeditor 2.6.3 Beta
  • milestone set to FCKeditor 2.6.4

Changed 18 months ago by martinkou

  • owner set to martinkou
  • status changed from new to assigned

Changed 18 months ago by martinkou

  • description modified (diff)

Tidied up the description a bit.

Changed 18 months ago by martinkou

Changed 18 months ago by martinkou

  • keywords Review? added

Changed 18 months ago by alfonsoml

  • keywords Review+ added; Review? removed

Changed 17 months ago by martinkou

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

Fixed with [2563].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.