/**\r
- * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.\r
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\r
* For licensing, see LICENSE.md or http://ckeditor.com/license\r
*/\r
\r
return;\r
\r
// When range is in nested editable, we have to replace range with this one,\r
- // which have root property set to closest editable, to make auto paragraphing work. (#12162)\r
+ // which have root property set to closest editable, to make auto paragraphing work. (http://dev.ckeditor.com/ticket/12162)\r
range = replaceRangeWithClosestEditableRoot( range );\r
\r
var doc = range.document;\r
\r
newBlock;\r
\r
- // Exit the list when we're inside an empty list item block. (#5376)\r
+ // Exit the list when we're inside an empty list item block. (http://dev.ckeditor.com/ticket/5376)\r
if ( atBlockStart && atBlockEnd ) {\r
- // Exit the list when we're inside an empty list item block. (#5376)\r
+ // Exit the list when we're inside an empty list item block. (http://dev.ckeditor.com/ticket/5376)\r
if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) ) {\r
// Make sure to point to the li when dealing with empty list item.\r
if ( !block.is( 'li' ) )\r
\r
var node;\r
\r
- // If this is a block under a list item, split it as well. (#1647)\r
+ // If this is a block under a list item, split it as well. (http://dev.ckeditor.com/ticket/1647)\r
if ( nextBlock ) {\r
node = nextBlock.getParent();\r
if ( node.is( 'li' ) ) {\r
if ( !isStartOfBlock && !isEndOfBlock ) {\r
// If the next block is an <li> with another list tree as the first\r
// child, we'll need to append a filler (<br>/NBSP) or the list item\r
- // wouldn't be editable. (#1420)\r
+ // wouldn't be editable. (http://dev.ckeditor.com/ticket/1420)\r
if ( nextBlock.is( 'li' ) ) {\r
var walkerRange = range.clone();\r
walkerRange.selectNodeContents( nextBlock );\r
\r
if ( previousBlock ) {\r
// Do not enter this block if it's a header tag, or we are in\r
- // a Shift+Enter (#77). Create a new block element instead\r
+ // a Shift+Enter (http://dev.ckeditor.com/ticket/77). Create a new block element instead\r
// (later in the code).\r
if ( previousBlock.is( 'li' ) || !( headerTagRegex.test( previousBlock.getName() ) || previousBlock.is( 'pre' ) ) ) {\r
// Otherwise, duplicate the previous block.\r
}\r
\r
if ( !newBlock ) {\r
- // We have already created a new list item. (#6849)\r
+ // We have already created a new list item. (http://dev.ckeditor.com/ticket/6849)\r
if ( node && node.is( 'li' ) )\r
newBlock = node;\r
else {\r
if ( !newBlock.getParent() )\r
range.insertNode( newBlock );\r
\r
- // list item start number should not be duplicated (#7330), but we need\r
- // to remove the attribute after it's onto the DOM tree because of old IEs (#7581).\r
+ // list item start number should not be duplicated (http://dev.ckeditor.com/ticket/7330), but we need\r
+ // to remove the attribute after it's onto the DOM tree because of old IEs (http://dev.ckeditor.com/ticket/7581).\r
newBlock.is( 'li' ) && newBlock.removeAttribute( 'value' );\r
\r
// This is tricky, but to make the new block visible correctly\r
} else {\r
var lineBreak;\r
\r
- // IE<8 prefers text node as line-break inside of <pre> (#4711).\r
+ // IE<8 prefers text node as line-break inside of <pre> (http://dev.ckeditor.com/ticket/4711).\r
if ( startBlockTag == 'pre' && CKEDITOR.env.ie && CKEDITOR.env.version < 8 )\r
lineBreak = doc.createText( '\r' );\r
else\r
function shiftEnter( editor ) {\r
// On SHIFT+ENTER:\r
// 1. We want to enforce the mode to be respected, instead\r
- // of cloning the current block. (#77)\r
+ // of cloning the current block. (http://dev.ckeditor.com/ticket/77)\r
return enter( editor, editor.activeShiftEnterMode, 1 );\r
}\r
\r
// Check path block specialities:\r
// 1. Cannot be a un-splittable element, e.g. table caption;\r
var path = editor.elementPath();\r
- if ( !path.isContextFor( 'p' ) ) {\r
+\r
+ if ( path && !path.isContextFor( 'p' ) ) {\r
mode = CKEDITOR.ENTER_BR;\r
forceMode = 1;\r
}\r