Ticket #3897 (closed Bug: fixed)

Opened 5 years ago

Last modified 5 years ago

There should be no image previews when the URL is empty in image dialog

Reported by: martinkou Owned by: tobiasz.cudnik
Priority: Normal Milestone: CKEditor 3.1
Component: UI : Dialogs Version: SVN (CKEditor) - OLD
Keywords: Oracle Confirmed Review+ Cc: Senthil

Description

To reproduce:

  1. Open replacebyclass sample in IE.
  2. Open the image dialog.
  3. Even before any URL is filled into the dialog box, we're still having a cross symbol in the preview pane.

Or, alternatively

  1. Open replacebyclass sample in any browser.
  2. Open the image dialog.
  3. Fill in any URL and defocus the URL text box.
  4. Remove the URL
  5. The image is still in the preview pane - it should be cleared instead.

Attachments

3897.patch (1.2 KB) - added by tobiasz.cudnik 5 years ago.
3897_2.patch (2.0 KB) - added by tobiasz.cudnik 5 years ago.
3897_3.patch (2.0 KB) - added by tobiasz.cudnik 5 years ago.

Change History

comment:1 Changed 5 years ago by martinkou

  • Keywords Oracle added
  • Cc Senthil added

comment:2 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.0 to CKEditor 3.1

comment:3 Changed 5 years ago by tobiasz.cudnik

  • Owner changed from martinkou to tobiasz.cudnik
  • Status changed from new to assigned

Changed 5 years ago by tobiasz.cudnik

comment:4 Changed 5 years ago by tobiasz.cudnik

  • Keywords Review? Confirmed added

comment:5 Changed 5 years ago by garry.yao

  • Keywords Review- added; Review? removed

It doesn't work for IE.

Changed 5 years ago by tobiasz.cudnik

comment:6 Changed 5 years ago by tobiasz.cudnik

  • Keywords Review? added; Review- removed

Seem that setAttribute( 'name', null ) doesn't work like removeAttribute( 'name' ) in IE, while doing so in other browsers.

comment:7 Changed 5 years ago by garry.yao

How about using the below codes after #3898's fix?

if( this.getContentElement( 'info', 'txtUrl' ).validate() != true )
// instead of
if ( !CKEDITOR.tools.trim( this.getValueOf( 'info', 'txtUrl' ) ) )

comment:8 Changed 5 years ago by garry.yao

  • Keywords Review- added; Review? removed

comment:9 Changed 5 years ago by tobiasz.cudnik

Using validate() doesn't work for first dialog show, while getValueOf() is not affected. I will check why that is happening.

Changed 5 years ago by tobiasz.cudnik

comment:10 Changed 5 years ago by tobiasz.cudnik

  • Keywords Review? added; Review- removed

After updating dialog file to newer revision it indeed works. Attaching new patch.

comment:11 Changed 5 years ago by garry.yao

  • Keywords Review+ added; Review? removed

R+ for 3897_2, 3897_3 instead will bring a validation alert which is not acceptable.

comment:12 Changed 5 years ago by tobiasz.cudnik

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [4179].

In future will can use 3897_3.patch, when dialog validation system will allow for it.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy