Skip to content

Commit

Permalink
Removed unused params, inlined callbacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
engineering-this committed Mar 1, 2019
1 parent 2ebf3e6 commit 650ae19
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions plugins/clipboard/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,13 +551,11 @@
editor.on( 'contentDom', addPasteListenersToEditable );

// For improved performance, we're checking the readOnly state on selectionChange instead of hooking a key event for that.
editor.on( 'selectionChange', function( evt ) {
setToolbarStates();
} );
editor.on( 'selectionChange', setToolbarStates );

// If the "contextmenu" plugin is loaded, register the listeners.
if ( editor.contextMenu ) {
editor.contextMenu.addListener( function( element, selection ) {
editor.contextMenu.addListener( function() {
return {
cut: stateFromNamedCommand( 'cut' ),
copy: stateFromNamedCommand( 'copy' ),
Expand Down Expand Up @@ -735,9 +733,7 @@
// since editable won't fire the event if selection process started within
// iframe and ended out of the editor (https://dev.ckeditor.com/ticket/9851).
editable.attachListener( CKEDITOR.env.ie ? editable : editor.document.getDocumentElement(), 'mouseup', function() {
mouseupTimeout = setTimeout( function() {
setToolbarStates();
}, 0 );
mouseupTimeout = setTimeout( setToolbarStates, 0 );
} );

// Make sure that deferred mouseup callback isn't executed after editor instance
Expand Down

0 comments on commit 650ae19

Please sign in to comment.