Opened 13 years ago
Closed 12 years ago
#10028 closed New Feature (fixed)
No need to confirm that "Cancel" button has been pressed
| Reported by: | Henrik Helmø Larsen | Owned by: | Marek Lewandowski |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.3 |
| Component: | UI : Dialogs | Version: | 3.0 |
| Keywords: | Cc: |
Description
I think it is very annoying that you have to (in some cases) confirm that you want to cancel opening a dialog. It would be nice if it could be possible to have a: CKEDITOR.config.ignoreConfirmCancel = true; which never would show the confirm dialog: "Some of the options have been changed. Are you sure to close the dialog?"
The dialog always appears if on the Link-dialog a change has been made in a combobox (dropdown) - for example the "Link Type"-combobox.
Attachments (1)
Change History (15)
Changed 13 years ago by
| Attachment: | LinkCancelConfirm.PNG added |
|---|
comment:1 Changed 13 years ago by
Sorry - forgot to write I am using CKEditor 4.0.1 (using Chrome on a Win 7 Ultimate 64bit machine)
comment:2 Changed 13 years ago by
| Status: | new → confirmed |
|---|---|
| Version: | → 3.0 |
Currently there is no option to disable this. It would be nice however to give users choice.
@Helmø code you are looking for is located in ckeditor/plugins/dialog/plugin.js
this.on( 'cancel', function( evt ) {
...
comment:3 Changed 13 years ago by
Exactly - I have added the following code:
this.on( 'cancel', function( evt ) {
if (!editor.config.ignoreConfirmCancel) {
iterContents( function( item ) {
if ( item.isChanged() ) {
if ( !confirm( editor.lang.common.confirmCancel ) )
evt.data.hide = false;
return true;
}
});
}
}, this, null, 0 );
if (!editor.config.ignoreConfirmCancel) being the added code.
And then I have defined config.ignoreConfirmCancel = true; in config.js
comment:5 Changed 12 years ago by
| Owner: | set to Marek Lewandowski |
|---|---|
| Status: | confirmed → review |
Fixed with git:a93d09be787 on dev and 108d0c5f on tests. Branch t/10028.
comment:6 Changed 12 years ago by
| Milestone: | → CKEditor 4.2.2 |
|---|
comment:8 Changed 12 years ago by
For me this change is now ok, but it should wait until next week until Fred will be back, to get green light.
comment:9 Changed 12 years ago by
This is a new feature so ideally it would land on 4.3, not 4.2.2.
Plus some things with the doc string:
- there is no name of an option specified,
- in official documentation you should not use contractions like "it's", "shouldn't".
comment:10 Changed 12 years ago by
| Milestone: | CKEditor 4.2.2 → CKEditor 4.3 |
|---|
Yes, that's a new feature, so 4.3.
comment:11 Changed 12 years ago by
| Status: | review → review_failed |
|---|
The configuration name is not good. If you look at it out of the box, "ignoreConfirmCancel" is quite confusing and has no association with dialogs. I would propose "dialog_noConfirmCancel", to also align to the new naming convention for plugins.
comment:12 Changed 12 years ago by
| Status: | review_failed → review |
|---|
Branch t/10028 (dev and tests) updated, requesting for next review.
comment:13 Changed 12 years ago by
| Status: | review → review_passed |
|---|
After some additional fixes in tests and doc str, R+.
comment:14 Changed 12 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Merged to major on git:1828df8 on dev and dd65c85 on tests.

"Confirm-cancel" dialog being displayed because Link Type has changed