Skip to content

Commit

Permalink
Merge branch 't/12597'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Jan 15, 2015
2 parents 9aa583c + 5055a90 commit f6cbb24
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ CKEditor 4 Changelog

Fixed Issues:

* [#12157](http://dev.ckeditor.com/ticket/12157): Fixed: Lost text formatting when pressing `tab` when [tabSpaces](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-tabSpaces) config option was greater than zero.
* [#12157](http://dev.ckeditor.com/ticket/12157): Fixed: Lost text formatting when pressing *Tab* when [`config.tabSpaces`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-tabSpaces) config option was greater than zero.
* [#12777](http://dev.ckeditor.com/ticket/12777): Fixed: The `table-layout` CSS property should be reset by skins. Thanks to [vita10gy](https://github.com/vita10gy)!
* [#12812](http://dev.ckeditor.com/ticket/12812): Fixed: A uncaught security exception is thrown when [lineutils](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.lineutils) are used in an inline editor loaded in a cross-domain iframe. Thanks to [Vitaliy Zurian](https://github.com/thecatontheflat)!
* [#12747](http://dev.ckeditor.com/ticket/12747): [IE8-10] Fixed: Opening a drop-down for a specific selection when editor is maximized results in incorrect drop-down panel position.
* [#12735](http://dev.ckeditor.com/ticket/12735): Fixed: [`Config.fillEmptyBlocks`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fillEmptyBlocks) should only apply when outputting data.
* [#12750](http://dev.ckeditor.com/ticket/12750): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword): strikethrough and underscore should have the same color as font.
* [#10032](http://dev.ckeditor.com/ticket/10032): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) filter is executed for every paste after using the button.
* [#12597](http://dev.ckeditor.com/ticket/12597): [Blink/Webkit] Fixed: Multi-byte Japanese chars entry not working properly after *Shift+Enter*.

## CKEditor 4.4.6

Expand Down
10 changes: 8 additions & 2 deletions plugins/undo/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,13 @@
* @param {CKEDITOR.dom.event} evt
*/
onKeydown: function( evt ) {
var keyCode = evt.data.getKey();

// The composition is in progress - ignore the key. (#12597)
if ( keyCode === 229 ) {
return;
}

// Block undo/redo keystrokes when at the bottom/top of the undo stack (#11126 and #11677).
if ( CKEDITOR.tools.indexOf( keystrokes, evt.data.getKeystroke() ) > -1 ) {
evt.data.preventDefault();
Expand All @@ -930,8 +937,7 @@
// Cleaning tab functional keys.
this.keyEventsStack.cleanUp( evt );

var keyCode = evt.data.getKey(),
undoManager = this.undoManager;
var undoManager = this.undoManager;

// Gets last record for provided keyCode. If not found will create one.
var last = this.keyEventsStack.getLast( keyCode );
Expand Down
18 changes: 17 additions & 1 deletion tests/plugins/undo/undo.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,22 @@ bender.test( {
} ) ;
},

// #12597
'test no beforeUndoImage event fire while composition': function() {
var bot = this.editorBot,
editor = bot.editor,
calls = 0;

bot.editor.on( 'beforeUndoImage', function() {
calls++;
} );

var evt = new CKEDITOR.dom.event( { keyCode: 229 } );
editor.editable().fire( 'keydown', evt );

assert.areSame( 0, calls, 'There should be no calls' );
},

'test undo with "control" type selection in IE': function() {
if ( !CKEDITOR.env.ie || ( document.documentMode || CKEDITOR.env.version ) > 8 )
assert.ignore();
Expand Down Expand Up @@ -831,4 +847,4 @@ bender.test( {

wait();
}
} );
} );

0 comments on commit f6cbb24

Please sign in to comment.