X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Flist%2Fplugin.js;h=be10d0d54361c6609b0330436799b95c34e653f0;hb=refs%2Ftags%2Fv3.6;hp=b0676d0def8917b81fc3ac02cd979188f8cd7066;hpb=1056598c95187351dc58f4991d331e2258d038b5;p=ckeditor.git diff --git a/_source/plugins/list/plugin.js b/_source/plugins/list/plugin.js index b0676d0..be10d0d 100644 --- a/_source/plugins/list/plugin.js +++ b/_source/plugins/list/plugin.js @@ -218,6 +218,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function onSelectionChange( evt ) { + if ( evt.editor.readOnly ) + return null; + var path = evt.data.path, blockLimit = path.blockLimit, elements = path.elements, @@ -228,8 +231,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license for ( i = 0 ; i < elements.length && ( element = elements[ i ] ) && !element.equals( blockLimit ); i++ ) { - if ( listNodeNames[ elements[i].getName() ] ) - return this.setState( this.type == elements[i].getName() ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); + if ( listNodeNames[ elements[ i ].getName() ] ) + return this.setState( this.type == elements[ i ].getName() ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); } return this.setState( CKEDITOR.TRISTATE_OFF );