Skip to content
Permalink
Browse files

Merge branch 't/14714' into major

  • Loading branch information...
mlewand committed Mar 15, 2017
2 parents 056ee77 + 8488f7d commit e0e0043f5c945dac6f077c25df4f9cb96c3f4486
@@ -11,6 +11,7 @@ New Features:

Fixed Issues:

* [#14714](http://dev.ckeditor.com/ticket/14714): [Webkit/Blink] Exception thrown on refocusing a blurred inline editor.
* [#16821](http://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `spans` with `height` style stacked when [pasting from Word](http://ckeditor.com/addon/pastefromword).
* [#12465](http://dev.ckeditor.com/ticket/12465): Fixed: Can't change state of checkboxes/radio buttons if the properties dialog was invoked via double-click.
* [#13062](http://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link.
@@ -164,6 +164,7 @@
// creating it.
if ( fillingChar.getCustomData( 'ready' ) ) {
removeFillingCharSequenceNode( editable );
editable.editor.fire( 'selectionCheck' );
} else {
fillingChar.setCustomData( 'ready', 1 );
}
@@ -761,7 +762,9 @@
case 8: // BACKSPACE
case 45: // INS
case 46: // DEl
removeFillingCharSequenceNode( editable );
if ( editable.hasFocus ) {
removeFillingCharSequenceNode( editable );
}
}

}, null, null, -1 );
@@ -422,6 +422,8 @@ bender.test( {
editor.setData( '<p id="p">foo<em>bar</em></p>' );
editor.setMode( 'wysiwyg', function() {
resume( function() {
// Editor needs to have focus to remove FC on keydown. (#14714)
editor.focus();
// TC1 - on keydown
// <p>foo^<em>...
var range = editor.createRange();
@@ -541,6 +543,9 @@ bender.test( {

this.assertFillingChar( editable, uEl, 'abc', 'after typing' );

// Editor needs to have focus to remove FC on keydown. (#14714)
editor.focus();

// Mock LEFT arrow.
editor.document.fire( 'keydown', new CKEDITOR.dom.event( { keyCode: 37 } ) );

@@ -695,5 +695,34 @@ bender.test( {
} );

assert.isFalse( preventSpy.called, 'preventDefault() on keydown was called' );
},

// (#14714)
'test remove filling char sequence on keydown blur': function() {
if ( !CKEDITOR.env.webkit ) {
assert.ignore();
}

// If editor has no focus, filling character should not be removed in WebKits. (#14714)
var editable = this.editor.editable();
var fillingCharSequence = CKEDITOR.tools.repeat( '\u200b', 7 );

var par = this.editor.document.$.createElement( 'p' );
var span = this.editor.document.$.createElement( 'span' );
var text = editable.getDocument().createText( fillingCharSequence );

par.appendChild( span );
span.appendChild( text.$ );

editable.setCustomData( 'cke-fillingChar', text );
this.editor.focusManager.blur( true );
editable.$.innerHTML = '';
editable.$.appendChild( par );

assert.areEqual( 7, editable.$.innerText.length, 'before' );
editable.hasFocus = false;
this.editor.document.fire( 'keydown', new CKEDITOR.dom.event( { keyCode: 46 } ) );

assert.areEqual( 7, editable.$.innerText.length );
}
} );
@@ -0,0 +1,16 @@
<head>
<link rel="stylesheet" href="/apps/ckeditor/contents.css">
<style>
div#wrapper {
margin-top: 50px;
}
</style>
</head>

<div id="wrapper">
<textarea id="editor1">Hello world!</textarea>
</div>

<script>
CKEDITOR.replace( 'editor1' );
</script>
@@ -0,0 +1,15 @@
@bender-tags: 4.7.0, tc, 14714
@bender-ckeditor-plugins:toolbar,stylescombo,divarea,sourcearea

1. Make sure you have console open.
1. Clear up the editor content.
1. Put the selection inside the editor.
1. Select "Marker" style from a styles dropdown and type some text.
1. Blur the editor (by clicking outside of the editor).
1. Click on styles button and apply **Big** style.

**Expected result:**
The **Big** style was applied (typing produces big and marked text).

**Unexpected result:**
There is an error thrown.
@@ -0,0 +1,16 @@
<head>
<link rel="stylesheet" href="/apps/ckeditor/contents.css">
<style>
div#wrapper {
margin-top: 50px;
}
</style>
</head>

<div id="wrapper">
<textarea id="editor1">Hello world!</textarea>
</div>

<script>
CKEDITOR.replace( 'editor1' );
</script>
@@ -0,0 +1,17 @@
@bender-tags: 4.7.0, tc, 14714
@bender-ckeditor-plugins:toolbar,stylescombo,divarea,elementspath

1. Make sure you have console open.
1. Clear up the editor content.
1. Put the selection inside the editor.
1. Select "Marker" style from a styles dropdown and type some text.
1. Blur the editor (by clicking outside of the editor).
1. Click on styles button.
1. Blur the editor (by clicking outside of the editor).
1. Click on styles button.

**Expected result:**
The styles dropdown was opened without any errors.

**Unexpected result:**
There is an error thrown.
@@ -0,0 +1,16 @@
<head>
<link rel="stylesheet" href="/apps/ckeditor/contents.css">
<style>
div#wrapper {
margin-top: 50px;
}
</style>
</head>

<div id="wrapper">
<textarea id="editor1">Hello world!</textarea>
</div>

<script>
CKEDITOR.replace( 'editor1' );
</script>
@@ -0,0 +1,15 @@
@bender-tags: 4.7.0, tc, 14714
@bender-ckeditor-plugins:toolbar,stylescombo,divarea,elementspath,font

1. Make sure you have console open.
1. Clear up the editor content.
1. Put the selection inside the editor.
1. Select "Marker" style from a styles dropdown and type some text.
1. Type Alt + F10 to focus toolbar.
1. Press left/right arrow keys to navigate between dropdowns.

**Expected result:**
Navigating between dropdowns is possible without errors.

**Unexpected result:**
Navigating between dropdowns results in error being thrown.

0 comments on commit e0e0043

Please sign in to comment.
You can’t perform that action at this time.