Ticket #5512: 5512_2.patch

File 5512_2.patch, 1.2 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/contextmenu/plugin.js

     
    208208                                             ( CKEDITOR.env.webkit ? holdCtrlKey : ( CKEDITOR.env.mac ? domEvent.$.metaKey : domEvent.$.ctrlKey ) ) )
    209209                                                return;
    210210
    211                                         // Selection will be unavailable after context menu shows up
    212                                         // in IE, lock it now.
    213                                         if ( CKEDITOR.env.ie )
    214                                         {
    215                                                 var selection = this.editor.getSelection();
    216                                                 selection && selection.lock();
    217                                         }
    218211
    219212                                        // Cancel the browser context menu.
    220213                                        domEvent.preventDefault();
     
    257250                show : function( offsetParent, corner, offsetX, offsetY )
    258251                {
    259252                        this.editor.focus();
     253
     254                        // Selection will be unavailable after context menu shows up
     255                        // in IE, lock it now.
     256                        if ( CKEDITOR.env.ie )
     257                        {
     258                                var selection = this.editor.getSelection();
     259                                selection && selection.lock();
     260                        }
     261
    260262                        this._.onMenu( offsetParent || CKEDITOR.document.getDocumentElement(), corner, offsetX || 0, offsetY || 0 );
    261263                }
    262264        }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy