Changeset 1134


Ignore:
Timestamp:
11/28/2007 06:51:11 PM (7 years ago)
Author:
fredck
Message:

Fixed #1587 : Partially reverted [1084] and changed its logic so _EnsureFocusIE will be executed on empty blocks only.

File:
1 edited

Legend:

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

    r1095 r1134  
    306306        var range = this.Document.selection.createRange() ; 
    307307 
     308        var parentNode = range.parentElement() ; 
     309        var parentTag = parentNode.nodeName.toLowerCase() ; 
     310 
     311        // Only apply the fix when in a block, and the block is empty. 
     312        if ( parentNode.childNodes.length > 0 || 
     313                 !( FCKListsLib.BlockElements[parentTag] ||  
     314                    FCKListsLib.NonEmptyBlockElements[parentTag] ) ) 
     315        { 
     316                return ; 
     317        } 
     318 
    308319        range.moveEnd( "character", 1 ) ; 
    309320        range.select() ; 
     321 
    310322        if ( range.boundingWidth > 0 ) 
    311323        { 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy