Changeset 668

Show
Ignore:
Timestamp:
2007-08-16 16:36:03 (17 months ago)
Author:
alfonsoml
Message:

Loading the _samples/ frameset in IE was giving an error, protect the detection of Text selections.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fckselection_ie.js

    r642 r668  
    3131        // It is possible that we can still get a text range object even when type=='None' is returned by IE. 
    3232        // So we'd better check the object returned by createRange() rather than by looking at the type. 
    33         if ( FCK.EditorDocument.selection.createRange().parentElement ) 
    34                 return 'Text' ; 
    35         else 
    36                 return 'None' ; 
     33        try 
     34        { 
     35                if ( FCK.EditorDocument.selection.createRange().parentElement ) 
     36                        return 'Text' ; 
     37        } 
     38        catch(e) 
     39        { 
     40                // Nothing to do, it will return None properly. 
     41        } 
     42 
     43        return 'None' ; 
    3744} ; 
    3845