X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Findent%2Fplugin.js;h=7b28c773c845ac89928617ffcd20a6fd2958ab14;hp=1e3ec49dd45698e525abf2308c57a3c51a796c6f;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hpb=2f22c0c38f17e75be5541089076885442aaa2377 diff --git a/_source/plugins/indent/plugin.js b/_source/plugins/indent/plugin.js index 1e3ec49..7b28c77 100644 --- a/_source/plugins/indent/plugin.js +++ b/_source/plugins/indent/plugin.js @@ -142,8 +142,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { listArray[ i ].indent += indentOffset; // Make sure the newly created sublist get a brand-new element of the same type. (#5372) - var listRoot = listArray[ i ].parent; - listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); + if ( indentOffset > 0 ) + { + var listRoot = listArray[ i ].parent; + listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); + } } for ( i = lastItem.getCustomData( 'listarray_index' ) + 1 ; @@ -425,25 +428,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } } }); - - editor.on( 'key', function( evt ) - { - // Backspace at the beginning of list item should outdent it. - if ( editor.mode == 'wysiwyg' && evt.data.keyCode == 8 ) - { - var sel = editor.getSelection(), - range = sel.getRanges()[ 0 ], - li; - - if ( range.collapsed && - ( li = range.startContainer.getAscendant( 'li', 1 ) ) && - range.checkBoundaryOfElement( li, CKEDITOR.START ) ) - { - editor.execCommand( 'outdent' ); - evt.cancel(); - } - } - }); }, requires : [ 'domiterator', 'list' ]