JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.1
[ckeditor.git] / _source / plugins / colorbutton / plugin.js
index 0fb8c05..16ad1f2 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -73,7 +73,7 @@ CKEDITOR.plugins.add( 'colorbutton',
                                                {\r
                                                        color = block && block.getComputedStyle( type == 'back' ? 'background-color' : 'color' ) || 'transparent';\r
                                                }\r
-                                               while ( type == 'back' && color == 'transparent' && ( block = block.getParent() ) );\r
+                                               while ( type == 'back' && color == 'transparent' && block && ( block = block.getParent() ) );\r
 \r
                                                // The box should never be transparent.\r
                                                if ( !color || color == 'transparent' )\r
@@ -220,7 +220,7 @@ CKEDITOR.plugins.add( 'colorbutton',
 \r
                function isUnstylable( ele )\r
                {\r
-                       return ( ele.getAttribute( 'contentEditable' ) == 'false' ) || ele.getAttribute( 'data-cke-nostyle' );\r
+                       return ( ele.getAttribute( 'contentEditable' ) == 'false' ) || ele.getAttribute( 'data-nostyle' );\r
                }\r
        }\r
 });\r