Skip to content

Commit

Permalink
Merge branch 't/13798'
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Oct 22, 2015
2 parents e4f2432 + de7292c commit 8565201
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -8,6 +8,7 @@ Fixed Issues:
* [#13790](https://dev.ckeditor.com/ticket/13790): Fixed: Allow for the iframe having been removed already. Thanks to [Stefan Rijnhart](https://github.com/StefanRijnhart)!
* [#13803](https://dev.ckeditor.com/ticket/13803): Fixed: Allow the editor to be destroyed before being fully initialized. Thanks to [Cyril Fluck](https://github.com/cyril-sf)!
* [#13361](http://dev.ckeditor.com/ticket/13361): Fixed: Images fail when site path includes parentheses because background-image path needs single-quotes around URL value.
* [#13798](http://dev.ckeditor.com/ticket/13798): Fixed: Changing paragraph format causes cursor to move on Firefox 41.

## CKEditor 4.5.4

Expand Down
1 change: 1 addition & 0 deletions config.js
Expand Up @@ -67,6 +67,7 @@ CKEDITOR.editorConfig = function( config ) {
'undo,' +
'wysiwygarea';
// %REMOVE_END%
config.startupFocus = true;
};

// %LEAVE_UNMINIFIED% %REMOVE_LINE%
6 changes: 3 additions & 3 deletions core/editable.js
Expand Up @@ -1108,9 +1108,9 @@
} );
}

// Prevent Webkit/Blink from going rogue when joining
// blocks on BACKSPACE/DEL (#11861,#9998).
if ( CKEDITOR.env.webkit ) {
// Prevent Webkit/Blink/Gecko from going rogue when joining
// blocks on BACKSPACE/DEL (#13798,#11861,#9998).
if ( CKEDITOR.env.webkit || CKEDITOR.env.gecko ) {
this.attachListener( editor, 'key', function( evt ) {
if ( editor.readOnly ) {
return true;
Expand Down
10 changes: 9 additions & 1 deletion tests/core/editable/keystrokes/keystrokes.js
Expand Up @@ -166,5 +166,13 @@ bender.test( {
// No content in a parent list.
this.assertKeystroke( DEL, 0, '<ul><li><table><tbody><tr><td>[foo]</td></tr></tbody></table></li></ul>',
'^', 'table 3' );
},

// ##13798
'test caret position after pressing BACKSPACE between blocks in Firefox': function() {
if ( !CKEDITOR.env.gecko )
assert.ignore();

this.assertKeystroke( BACKSPACE, 0, '<h1>Head</h1><p>^ing</p>', '<h1>Head^ing</h1>', 'blocks are correctly joined' );
}
} );
} );
9 changes: 9 additions & 0 deletions tests/tickets/13798/1.html
@@ -0,0 +1,9 @@
<body>
<div id="editor">
<h1>Heading</h1>
</div>

<script>
CKEDITOR.replace( 'editor' );
</script>
</body>
15 changes: 15 additions & 0 deletions tests/tickets/13798/1.md
@@ -0,0 +1,15 @@
@bender-tags: tc, 4.5.5, editor, 13798
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, format, toolbar

###Only on Firefox###

----

1. Set the cursor after "d" letter in a heading.
2. Press Enter.
3. Change the paragraph format to Normal.
4. Press Backspace.

**Expected:**
* Cursor is placed after "d" letter in the heading.

0 comments on commit 8565201

Please sign in to comment.