Ticket #7316: 7316.patch

File 7316.patch, 1.6 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/selection/plugin.js

     
    2525
    2626                        if ( !currentPath.compare( this._.selectionPreviousPath ) )
    2727                        {
    28                                 this._.selectionPreviousPath = currentPath;
    29                                 this.fire( 'selectionChange', { selection : sel, path : currentPath, element : firstElement } );
    30                         }
    31                 }
     28                                var data = { selection : sel, path : currentPath, element : firstElement };
     29                                if ( this.fire( 'beforeSelectionChange', data ) )
     30                                {
     31                                        this._.selectionPreviousPath = currentPath;
     32                                        this.fire( 'selectionChange', data );
     33                                }
     34                        }
     35                }
    3236                catch (e)
    3337                {}
    3438        }
  • _source/plugins/clipboard/plugin.js

     
    208208
    209209                var bms = sel.createBookmarks();
    210210
     211                // Depress "selectionChange" event inside paste bin. (#7316)
     212                this.on( 'beforeSelectionChange', function( evt ) { evt.data = false; });
     213
    211214                // Turn off design mode temporarily before give focus to the paste bin.
    212215                if ( mode == 'text' )
    213216                {
     
    234237                {
    235238                        mode == 'text' && CKEDITOR.env.gecko && editor.focusGrabber.focus();
    236239                        pastebin.remove();
     240                        editor.removeListener( 'beforeSelectionChange' );
    237241
    238242                        // Grab the HTML contents.
    239243                        // We need to look for a apple style wrapper on webkit it also adds
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy