Skip to content

Commit

Permalink
Merge branch 't/9851'
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Feb 8, 2013
2 parents d090294 + 7264b27 commit b862b5f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -9,6 +9,7 @@ CKEditor 4 Changelog
* [#9887](http://dev.ckeditor.com/ticket/9887): Disable magicline when editor.readOnly is set.
* [#9882](http://dev.ckeditor.com/ticket/9882): Fixed empty document title on getData() if set via docprops dialog.
* [#9773](http://dev.ckeditor.com/ticket/9773): Fixed rendering problems with select fields in Kama.
* [#9851](http://dev.ckeditor.com/ticket/9851): SelectionChange isn't fired when mouse selection finished outside editable.

## CKEditor 4.0.1

Expand Down
6 changes: 5 additions & 1 deletion core/selection.js
Expand Up @@ -381,8 +381,12 @@
});
}
// In all other cases listen on simple mouseup over editable, as we did before #9699.
//
// Use 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).
else
editable.attachListener( editable, 'mouseup', checkSelectionChangeTimeout, editor );
editable.attachListener( CKEDITOR.env.ie ? editable : doc.getDocumentElement(), 'mouseup', checkSelectionChangeTimeout, editor );

if ( CKEDITOR.env.webkit ) {
// Before keystroke is handled by editor, check to remove the filling char.
Expand Down
5 changes: 4 additions & 1 deletion plugins/clipboard/plugin.js
Expand Up @@ -477,7 +477,10 @@
!preventBeforePasteEvent && fixCut( editor );
});

editable.on( 'mouseup', function() {
// 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).
( CKEDITOR.env.ie ? editable : editor.document.getDocumentElement() ).on( 'mouseup', function() {
setTimeout( function() {
setToolbarStates();
}, 0 );
Expand Down

0 comments on commit b862b5f

Please sign in to comment.