Changeset 1083

Show
Ignore:
Timestamp:
2007-11-15 09:41:26 (2 years ago)
Author:
martinkou
Message:

Fixed #1420 : Fixed the issue where pressing enter in a nested list can generate uneditable list items.

Files:
1 modified

Legend:

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

    r1055 r1083  
    418418                if ( !oSplitInfo.WasStartOfBlock && !oSplitInfo.WasEndOfBlock ) 
    419419                { 
     420                        // If the next block is an <li> with another list tree as the first child 
     421                        // We'll need to append a placeholder or the list item wouldn't be editable. (Bug #1420) 
     422                        if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild 
     423                                        && eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) ) 
     424                                eNextBlock.insertBefore( eNextBlock.ownerDocument.createTextNode( '\xa0' ), eNextBlock.firstChild ) ; 
    420425                        // Move the selection to the end block. 
    421426                        if ( eNextBlock )