Skip to content

Commit 1828df8

Browse files
committed
Merge branch 't/10028' into major
2 parents 0a98f20 + 3421b69 commit 1828df8

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ CKEditor 4 Changelog
33

44
## CKEditor 4.3
55

6+
New Features:
7+
8+
* [#10028](http://dev.ckeditor.com/ticket/10028): New option [`config.dialog_noConfirmCancel`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-dialog_noConfirmCancel).
9+
610
Fixed Issues:
711

812
* [#10612](http://dev.ckeditor.com/ticket/10612): Internet Explorer 11 compatibility issues.

plugins/dialog/plugin.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
370370
this.on( 'cancel', function( evt ) {
371371
iterContents( function( item ) {
372372
if ( item.isChanged() ) {
373-
if ( !confirm( editor.lang.common.confirmCancel ) )
373+
if ( !editor.config.dialog_noConfirmCancel && !confirm( editor.lang.common.confirmCancel ) )
374374
evt.data.hide = false;
375375
return true;
376376
}
@@ -3116,6 +3116,17 @@ CKEDITOR.plugins.add( 'dialog', {
31163116
* @member CKEDITOR.config
31173117
*/
31183118

3119+
/**
3120+
* Tells if user should not be asked to confirm close, if any dialog field was modified.
3121+
* By default it is set to `false` meaning that the confirmation dialog will be shown.
3122+
*
3123+
* config.dialog_noConfirmCancel = true;
3124+
*
3125+
* @since 4.3
3126+
* @cfg {Boolean} [dialog_noConfirmCancel=false]
3127+
* @member CKEDITOR.config
3128+
*/
3129+
31193130
/**
31203131
* Fired when a dialog definition is about to be used to create a dialog into
31213132
* an editor instance. This event makes it possible to customize the definition

0 commit comments

Comments
 (0)