]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blobdiff - sources/plugins/enterkey/plugin.js
Update to 4.7.3
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / plugins / enterkey / plugin.js
index 9410bbdbc9015e6b6ab57184d6a0f091756585d9..e65555feb3059400259d3ab3443d8c4baacf2789 100644 (file)
@@ -43,7 +43,7 @@
                                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
@@ -58,9 +58,9 @@
 \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