#2525: Chrome: error if FCKConfig.StartupShowBlocks = true
------------------------+---------------------------------------------------
Reporter: fournaise | Owner: martinkou
Type: Bug | Status: assigned
Priority: Normal | Milestone: FCKeditor 2.6.4
Component: General | Version: FCKeditor 2.6.3 Beta
Resolution: | Keywords: Confirmed Chrome Firefox
------------------------+---------------------------------------------------
Old description:
> 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
New description:
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
--
Comment(by martinkou):
Tidied up the description a bit.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2525#comment:6>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac