Changeset 1082

Show
Ignore:
Timestamp:
2007-11-15 07:36:13 (2 years ago)
Author:
martinkou
Message:

Fix for #1491 : Fixed selection bug in IE when the caret is inside an empty list item.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckeditingarea.js

    r933 r1082  
    311311        var range = this.Document.selection.createRange() ; 
    312312 
    313         // Only apply the fix when in a block and the block is empty. 
     313        // Only apply the fix when in a block, the block is empty, and we're not in a list item. 
    314314        var parentNode = range.parentElement() ; 
    315315 
    316         if ( ! ( parentNode.childNodes.length == 0 && (  
    317                                         FCKListsLib.BlockElements[parentNode.nodeName.toLowerCase()] ||  
    318                                         FCKListsLib.NonEmptyBlockElements[parentNode.nodeName.toLowerCase()] ) ) ) 
     316        var parentTag = parentNode.nodeName.toLowerCase() ; 
     317        if ( ! ( parentNode.childNodes.length == 0 && parentTag != 'li' && (  
     318                                        FCKListsLib.BlockElements[parentTag] ||  
     319                                        FCKListsLib.NonEmptyBlockElements[parentTag] ) ) ) 
    319320                return ; 
    320321