﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10052	Image dialog - preview do not refresh when field is cleared	Gael		"The preview window in the image dialog do not clear the CSS attribute when the value is cleared:

1. Insert an image in CKEditor.
2. Right click on the image and open the image dialiog.
3. Enter a border of 9. The preview image show a border of 9px.
4. Clear the border field (erase the number 9 from the field). The preview image still show a border of 9px.

Affect: Border, HSpace VSpace, etc.

I notice the following in the code:[[BR]]
File: _source/plugins/image/dialogs/image.js[[BR]]
Line: 848
{{{
if ( !isNaN( value ) )
{
	element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) );
	element.setStyle( 'border-style', 'solid' );
}
else if ( !value && this.isChanged() )
	element.removeStyle( 'border' );
}}}

I don't understand why it check if the field has been changed before removing the style, but if I remove that check, it works as expected:
{{{
if ( !isNaN( value ) )
{
	element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) );
	element.setStyle( 'border-style', 'solid' );
}
else if ( !value )
	element.removeStyle( 'border' );
}}}"	Bug	confirmed	Normal		UI : Dialogs	3.0.2			
