Ticket #4709: 4709.patch

File 4709.patch, 1.4 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/selection/plugin.js

     
    9292                {
    9393                        editor.on( 'contentDom', function()
    9494                                {
    95                                         var doc = editor.document;
     95                                        var doc = editor.document,
     96                                                body = doc.getBody();
    9697
    9798                                        if ( CKEDITOR.env.ie )
    9899                                        {
     
    107108                                                // "onfocusin" is fired before "onfocus". It makes it
    108109                                                // possible to restore the selection before click
    109110                                                // events get executed.
    110                                                 doc.on( 'focusin', function()
     111                                                body.on( 'focusin', function()
    111112                                                        {
    112113                                                                // If we have saved a range, restore it at this
    113114                                                                // point.
     
    150151
    151152                                                // IE fires the "selectionchange" event when clicking
    152153                                                // inside a selection. We don't want to capture that.
    153                                                 doc.on( 'mousedown', disableSave );
    154                                                 doc.on( 'mouseup',
     154                                                body.on( 'mousedown', disableSave );
     155                                                body.on( 'mouseup',
    155156                                                        function( evt )
    156157                                                        {
    157158                                                                // IE context-menu event in table cells collapse
     
    170171                                                                        0 );
    171172                                                        });
    172173
    173                                                 doc.on( 'keydown', disableSave );
    174                                                 doc.on( 'keyup',
     174                                                body.on( 'keydown', disableSave );
     175                                                body.on( 'keyup',
    175176                                                        function()
    176177                                                        {
    177178                                                                saveEnabled = true;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy