Changeset 5973


Ignore:
Timestamp:
10/22/2010 09:21:36 AM (5 years ago)
Author:
garry.yao
Message:

#6282: Removing the first round of bookmarking when applying styles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/_source/plugins/styles/plugin.js

    r5972 r5973  
    13581358        {
    13591359                var selection = document.getSelection(),
    1360                         // Bookmark the range so we can re-select it after processing.
    1361                         bookmarks = selection.createBookmarks(),
    13621360                        ranges = selection.getRanges( true ),
    13631361                        func = remove ? this.removeFromRange : this.applyToRange,
     
    13681366                        func.call( this, range );
    13691367
    1370                 if ( bookmarks.length == 1 && bookmarks[0].collapsed )
    1371                 {
    1372                         selection.selectRanges( ranges );
    1373                         bookmarks[0].startNode.remove();
    1374                 }
    1375                 else
    1376                         selection.selectBookmarks( bookmarks );
     1368                selection.selectRanges( ranges );
    13771369        }
    13781370})();
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy