Changeset 6035


Ignore:
Timestamp:
11/03/10 17:37:35 (5 years ago)
Author:
Saare
Message:

#6621: Webkit: Cannot apply a text color because of an input element.

File:
1 edited

Legend:

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

    r6001 r6035  
    13541354        {
    13551355                var selection = document.getSelection(),
    1356                         ranges = selection.getRanges( true ),
     1356                        // Bookmark the range so we can re-select it after processing.
     1357                        bookmarks = selection.createBookmarks( 1 ),
     1358                        ranges = selection.getRanges( 1 ),
    13571359                        func = remove ? this.removeFromRange : this.applyToRange,
    13581360                        range;
     
    13621364                        func.call( this, range );
    13631365
    1364                 selection.selectRanges( ranges );
     1366                if ( bookmarks.length == 1 && bookmarks[0].collapsed )
     1367                {
     1368                        selection.selectRanges( ranges );
     1369                        document.getById( bookmarks[ 0 ].startNode ).remove();
     1370                }
     1371                else
     1372                        selection.selectBookmarks( bookmarks );
    13651373        }
    13661374})();
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy