Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5683)
+++ /CKEditor/trunk/CHANGES.html	(revision 5684)
@@ -65,4 +65,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4997">#4997</a> : Provide better access to the native input in the ui.dialog.file element.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5914">#5914</a> : Modified the Smilies dialog to make active only the images and not their borders.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5882">#5882</a> : New event dialog#selectPage like the OnDialogTabChange in FCKeditor.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 5683)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 5684)
@@ -939,4 +939,11 @@
 		selectPage : function( id )
 		{
+			if ( this._.currentTabId == id )
+				return;
+
+			// Returning true means that the event has been canceled
+			if ( this.fire( 'selectPage', { page : id, currentPage : this._.currentTabId } ) === true )
+				return;
+
 			// Hide the non-selected tabs and pages.
 			for ( var i in this._.tabs )
@@ -2949,2 +2956,10 @@
  *		dialog.
  */
+
+/**
+ * Fired when a tab is going to be selected in a dialog
+ * @name dialog#selectPage
+ * @event
+ * @param String page The id of the page that it's gonna be selected.
+ * @param String currentPage The id of the current page.
+ */
