Skip to content

Commit

Permalink
Merge branch 't/10219b'
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Apr 2, 2013
2 parents 1aa6e75 + 77cc81a commit 86d354e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -4,6 +4,7 @@ CKEditor 4 Changelog
## CKEditor 4.1.1

* [#10172](http://dev.ckeditor.com/ticket/10172): Pressing delete/backspace in empty table cell moves cursor to next/previous cell.
* [#10219](http://dev.ckeditor.com/ticket/10219): Error thrown when destroying an instance in parallel with a mouseup event.

## CKEditor 4.1

Expand Down
11 changes: 10 additions & 1 deletion plugins/clipboard/plugin.js
Expand Up @@ -477,15 +477,24 @@
!preventBeforePasteEvent && fixCut( editor );
});

var mouseupTimeout;

// Use editor.document instead of editable in non-IEs for observing mouseup
// since editable won't fire the event if selection process started within
// iframe and ended out of the editor (#9851).
editable.attachListener( CKEDITOR.env.ie ? editable : editor.document.getDocumentElement(), 'mouseup', function() {
setTimeout( function() {
mouseupTimeout = setTimeout( function() {
setToolbarStates();
}, 0 );
});

// Make sure that deferred mouseup callback isn't executed after editor instance
// had been destroyed. This may happen when editor.destroy() is called in parallel
// with mouseup event (i.e. a button with onclick callback) (#10219).
editor.on( 'destroy', function() {
clearTimeout( mouseupTimeout );
});

editable.on( 'keyup', setToolbarStates );
}

Expand Down

0 comments on commit 86d354e

Please sign in to comment.