X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Findent%2Fplugin.js;h=7b28c773c845ac89928617ffcd20a6fd2958ab14;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hp=330af61448c7597185d5b5f0e79644acdf0f57fc;hpb=4e70ea24db840898be8cc21c950363a52a2a6aba;p=ckeditor.git diff --git a/_source/plugins/indent/plugin.js b/_source/plugins/indent/plugin.js index 330af61..7b28c77 100644 --- a/_source/plugins/indent/plugin.js +++ b/_source/plugins/indent/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -80,7 +80,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function isListItem( node ) { - return node.type = CKEDITOR.NODE_ELEMENT && node.is( 'li' ); + return node.type == CKEDITOR.NODE_ELEMENT && node.is( 'li' ); } indentCommand.prototype = { @@ -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 ;