Ticket #6987: 6987.patch

File 6987.patch, 1.1 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/selection/plugin.js

     
    134134                                                                // point.
    135135                                                                if ( savedRange )
    136136                                                                {
    137                                                                         // Range restored here might invalidate the DOM structure thus break up
    138                                                                         // the locked selection, give it up. (#6083)
    139                                                                         var lockedSelection = doc.getCustomData( 'cke_locked_selection' );
    140                                                                         if ( restoreEnabled && !lockedSelection )
     137                                                                        if ( restoreEnabled )
    141138                                                                        {
    142139                                                                                // Well not break because of this.
    143140                                                                                try
     
    146143                                                                                }
    147144                                                                                catch (e)
    148145                                                                                {}
    149                                                                         }
     146
     147                                                                                // Update locked selection because of the normalized text nodes. (#6083, #6987)
     148                                                                                var lockedSelection = doc.getCustomData( 'cke_locked_selection' );
     149                                                                                if ( lockedSelection )
     150                                                                                {
     151                                                                                        lockedSelection.unlock();
     152                                                                                        lockedSelection.lock();
     153                                                                                }
     154                                                                        }
    150155
    151156                                                                        savedRange = null;
    152157                                                                }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy