﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8331	"Ability to ignore ""Confirm Cancel""-warning on dialogs"	Henrik Helmø Larsen		"If changes have been made to a dialog and the cancel button is pressed an annoying ""Confirm Cancel"" warning is displayed. It would be nice to toggle weather you want this warning or not.

The new ""on cancel event"" on the dialog will look like:

{{{
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 );
}}}

The only line added is:

{{{
if (!editor.config.ignoreConfirmCancel)
}}}

which is in line 323 of the plugin.js in the dialog folder. This is just before the ''iterContents( function( item )...'' is called - thus ignoring this check if the ''ignoreConfirmCancel'' is set in the editors config.

In order to toggle the warning add the following line to the editors config:

{{{
config.ignoreConfirmCancel = true;
}}}

"	New Feature	confirmed	Normal		General			HasPatch	chris.ingham@…
