Index: _source/plugins/dialogui/plugin.js =================================================================== --- _source/plugins/dialogui/plugin.js (revision 4979) +++ _source/plugins/dialogui/plugin.js (working copy) @@ -955,7 +955,7 @@ */ setValue : function( value ) { - value = value || ''; + value = ( value != null ) ? value : ''; return CKEDITOR.ui.dialog.uiElement.prototype.setValue.call( this, value ); }, Index: _source/plugins/image/dialogs/image.js =================================================================== --- _source/plugins/image/dialogs/image.js (revision 4979) +++ _source/plugins/image/dialogs/image.js (working copy) @@ -800,11 +800,9 @@ { var value, borderStyle = element.getStyle( 'border-width' ); - borderStyle = borderStyle && borderStyle.match( /^(\d+px)(?: \1 \1 \1)?$/ ); value = borderStyle && parseInt( borderStyle[ 1 ], 10 ); - !value && ( value = element.getAttribute( 'border' ) ); - + isNaN ( parseInt( value ) ) && ( value = element.getAttribute( 'border' ) ); this.setValue( value ); } }, @@ -813,7 +811,7 @@ var value = parseInt( this.getValue(), 10 ); if ( type == IMAGE || type == PREVIEW ) { - if ( value ) + if ( !isNaN( value ) ) { element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) ); element.setStyle( 'border-style', 'solid' ); @@ -873,7 +871,7 @@ marginRightPx = parseInt( marginRightStyle, 10 ); value = ( marginLeftPx == marginRightPx ) && marginLeftPx; - !value && ( value = element.getAttribute( 'hspace' ) ); + isNaN( parseInt( value ) ) && ( value = element.getAttribute( 'hspace' ) ); this.setValue( value ); } @@ -883,7 +881,7 @@ var value = parseInt( this.getValue(), 10 ); if ( type == IMAGE || type == PREVIEW ) { - if ( value ) + if ( !isNaN( value ) ) { element.setStyle( 'margin-left', CKEDITOR.tools.cssLength( value ) ); element.setStyle( 'margin-right', CKEDITOR.tools.cssLength( value ) ); @@ -941,7 +939,7 @@ marginBottomPx = parseInt( marginBottomStyle, 10 ); value = ( marginTopPx == marginBottomPx ) && marginTopPx; - !value && ( value = element.getAttribute( 'vspace' ) ); + isNaN ( parseInt( value ) ) && ( value = element.getAttribute( 'vspace' ) ); this.setValue( value ); } }, @@ -950,7 +948,7 @@ var value = parseInt( this.getValue(), 10 ); if ( type == IMAGE || type == PREVIEW ) { - if ( value ) + if ( !isNaN( value ) ) { element.setStyle( 'margin-top', CKEDITOR.tools.cssLength( value ) ); element.setStyle( 'margin-bottom', CKEDITOR.tools.cssLength( value ) ); Index: CHANGES.html =================================================================== --- CHANGES.html (revision 4979) +++ CHANGES.html (working copy) @@ -51,6 +51,7 @@