Ticket #3880: 3880.patch

File 3880.patch, 1.6 KB (added by Martin Kou, 10 years ago)
  • editor/_source/classes/fckdomrange_ie.js

     
    7777FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand )
    7878{
    7979        var bIsCollapsed = this.CheckIsCollapsed() ;
    80         var bIsStartMakerAlone ;
     80        var bIsStartMarkerAlone ;
    8181        var dummySpan ;
    8282
    8383        // Create marker tags for the start and end boundaries.
     
    111111        }
    112112        else
    113113        {
    114                 bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
     114                bIsStartMarkerAlone = forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br';
    115115
    116116                // Append a temporary <span>&#65279;</span> before the selection.
    117117                // This is needed to avoid IE destroying selections inside empty
     
    122122                dummySpan.innerHTML = '&#65279;' ;      // Zero Width No-Break Space (U+FEFF). See #1359.
    123123                eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ;
    124124
    125                 if ( bIsStartMakerAlone )
     125                if ( bIsStartMarkerAlone )
    126126                {
    127127                        // To expand empty blocks or line spaces after <br>, we need
    128128                        // instead to have any char, which will be later deleted using the
     
    141141
    142142        if ( bIsCollapsed )
    143143        {
    144                 if ( bIsStartMakerAlone )
     144                if ( bIsStartMarkerAlone )
    145145                {
    146146                        // Move the selection start to include the temporary &#65279;.
    147147                        oIERange.moveStart( 'character', -1 ) ;
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy