Ticket #8632: 8632.patch

File 8632.patch, 1.0 KB (added by fdintino, 12 years ago)
  • _source/plugins/selection/plugin.js

     
    11981198
    11991199                                                walker.guard = guard( walker );
    12001200
     1201                                                // CKEDITOR.dom.walker.checkBackward()/checkForward() can
     1202                                                // make modifications to the DOM, and this has the effect
     1203                                                // of removing the selection in webkit. We bookmark the
     1204                                                // selection here for this contingency. (#8632)
     1205                                                var bm;
     1206                                                if ( CKEDITOR.env.webkit )
     1207                                                        bm = self.createBookmarks()[ 0 ];
     1208
    12011209                                                if ( walker.checkBackward() && !walker.halted )
    12021210                                                {
    12031211                                                        walker = new CKEDITOR.dom.walker( testRange );
     
    12071215                                                        if ( walker.checkForward() && !walker.halted )
    12081216                                                                retval = root.$;
    12091217                                                }
     1218
     1219                                                // Restore the selection after running the walker methods. (#8632[2])
     1220                                                bm && self.selectBookmarks( [ bm ] );
    12101221                                        }
    12111222
    12121223                                        if ( !retval )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy