Changeset 7049 for CKEditor/trunk


Ignore:
Timestamp:
06/14/11 17:16:58 (3 years ago)
Author:
garry.yao
Message:

#8040: Error thrown by bidi plugin ceased selection change event.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/_source/plugins/bidi/plugin.js

    r6904 r7049  
    3939 
    4040                // If we're having BODY here, user probably done CTRL+A, let's try to get the enclosed node, if any. 
    41                 selectedElement.is( 'body' ) && 
    42                         ( selectedElement = editor.getSelection().getRanges()[ 0 ].getEnclosedNode() ); 
    43  
    44                 if ( !selectedElement ) 
     41                if ( selectedElement.is( 'body' ) ) 
     42                { 
     43                        var enclosedNode = editor.getSelection().getRanges()[ 0 ].getEnclosedNode(); 
     44                        enclosedNode && enclosedNode.type == CKEDITOR.NODE_ELEMENT && ( selectedElement = enclosedNode ); 
     45                } 
     46 
     47                if ( !selectedElement  ) 
    4548                        return; 
    4649 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy