Opened 15 years ago

Closed 15 years ago

#3205 closed Bug (fixed)

Image dialog problem after close

Reported by: Garry Yao Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description

Reproducing Procedures

  1. Open the replace by class example page;
  2. Click on 'Image' dialog button to open dialog;
  3. Click on 'Cancel' button to close the dialog;
    • Actual Result: An JavaScript Error thrown;

Attachments (2)

3205.patch (2.3 KB) - added by Garry Yao 15 years ago.
3205_2.patch (705 bytes) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (10)

Changed 15 years ago by Garry Yao

Attachment: 3205.patch added

comment:1 Changed 15 years ago by Garry Yao

Keywords: Review? added
Status: newassigned

Refine the logic of clearing the preview area, which caused the error.

comment:2 Changed 15 years ago by Artur Formella

The patch is OK but why it stops working in onHide?

comment:3 Changed 15 years ago by Garry Yao

Actually there's some ambiguity with 'onHide' event which is actually fired after the dialog closed, the dialog system will unfortunately remove the dialog element from DOM temporarily, which cause subsequent update catch a 'element not found' error.
It's better for this case if there's a 'onBeforeHide' event which will certainly promising, but hooking it in 'onOk' and 'onCancel' conform to KISS as well.

comment:4 Changed 15 years ago by Artur Formella

Oh, yes. I've found it.

onHide() in the dialog without access to the dialog is less useful and less intuitive.

End-developers might have problems with that.

I think dialog should be removed after onHide is called.

comment:5 in reply to:  4 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

Replying to arczi:

I think dialog should be removed after onHide is called.

You are correct Artur... that's the right way for it.

Changed 15 years ago by Garry Yao

Attachment: 3205_2.patch added

comment:6 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed

comment:7 Changed 15 years ago by Artur Formella

Keywords: Review+ added; Review? removed

comment:8 Changed 15 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3300]. Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy