X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=sources%2Fplugins%2Fenterkey%2Fplugin.js;fp=sources%2Fplugins%2Fenterkey%2Fplugin.js;h=e65555feb3059400259d3ab3443d8c4baacf2789;hb=317f8f8f0651488f226b5280a8f036c7c135c639;hp=4cbb7bf8b7ea807ac691f78a848dc87a08a1a74f;hpb=1096cdefb1c9a3f3c4ca6807e272da6c92e5ed9c;p=perso%2FImmae%2FProjets%2Fpackagist%2Fpiedsjaloux-ckeditor-component.git diff --git a/sources/plugins/enterkey/plugin.js b/sources/plugins/enterkey/plugin.js index 4cbb7bf..e65555f 100644 --- a/sources/plugins/enterkey/plugin.js +++ b/sources/plugins/enterkey/plugin.js @@ -1,5 +1,5 @@ /** - * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ @@ -43,7 +43,7 @@ return; // When range is in nested editable, we have to replace range with this one, - // which have root property set to closest editable, to make auto paragraphing work. (#12162) + // which have root property set to closest editable, to make auto paragraphing work. (http://dev.ckeditor.com/ticket/12162) range = replaceRangeWithClosestEditableRoot( range ); var doc = range.document; @@ -58,9 +58,9 @@ newBlock; - // Exit the list when we're inside an empty list item block. (#5376) + // Exit the list when we're inside an empty list item block. (http://dev.ckeditor.com/ticket/5376) if ( atBlockStart && atBlockEnd ) { - // Exit the list when we're inside an empty list item block. (#5376) + // Exit the list when we're inside an empty list item block. (http://dev.ckeditor.com/ticket/5376) if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) ) { // Make sure to point to the li when dealing with empty list item. if ( !block.is( 'li' ) ) @@ -293,7 +293,7 @@ var node; - // If this is a block under a list item, split it as well. (#1647) + // If this is a block under a list item, split it as well. (http://dev.ckeditor.com/ticket/1647) if ( nextBlock ) { node = nextBlock.getParent(); if ( node.is( 'li' ) ) { @@ -313,7 +313,7 @@ if ( !isStartOfBlock && !isEndOfBlock ) { // If the next block is an
(#4711). + // IE<8 prefers text node as line-break inside of(http://dev.ckeditor.com/ticket/4711). if ( startBlockTag == 'pre' && CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) lineBreak = doc.createText( '\r' ); else @@ -503,7 +503,7 @@ function shiftEnter( editor ) { // On SHIFT+ENTER: // 1. We want to enforce the mode to be respected, instead - // of cloning the current block. (#77) + // of cloning the current block. (http://dev.ckeditor.com/ticket/77) return enter( editor, editor.activeShiftEnterMode, 1 ); } @@ -521,7 +521,8 @@ // Check path block specialities: // 1. Cannot be a un-splittable element, e.g. table caption; var path = editor.elementPath(); - if ( !path.isContextFor( 'p' ) ) { + + if ( path && !path.isContextFor( 'p' ) ) { mode = CKEDITOR.ENTER_BR; forceMode = 1; }