﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11640	"onClick event of ""send to server"" button not firing in image plugin"	Mandeep		"What I need to do is show an ""uploading"" text somewhere when the file is being sent to the server. Currently what I was trying to do is on the click of ""Send it to server"" button in the upload tab, I want to change the text of that button to ""Uploading"" so as the user will atleast know that the file is being uploaded. I consoled that button and found that i was getting an onClick event handler. I used it but it just wouldnt fire.

Here is my code.

CKEDITOR.replace('textarea1', {
		filebrowserImageUploadUrl: '/upload'
	});

	CKEDITOR.on('dialogDefinition', function(ev) {
		var dialogName = ev.data.name;
    	var dialogDefinition = ev.data.definition;

		if (dialogName == 'image') {
			dialogDefinition.onLoad = function() {
				var dialog = CKEDITOR.dialog.getCurrent();

				var uploadTab = dialogDefinition.getContents('Upload');
				var uploadButton = uploadTab.get('uploadButton');
				console.log('uploadButton', uploadButton);

				uploadButton['onClick'] = function(evt){
					console.log('fire in the hole', evt);
				}

				uploadButton['filebrowser']['onSelect'] = function(fileUrl, errorMessage) {
					console.log('working');
				}
			};

		}

	});



Notice that the onSelect handler successfully fires after the image has been uploaded to the server, but the onClick event wouldnt fire. I hope you look into this matter. And if you have a more better way of indicating the user that the file is being uploaded, I would really like to know.

I am using
CKEditor: version 4.3.3(I tried both with minified and unminified code)
Browser: Chrome 33.0

Let me know if you want any other details. Thank you."	Bug	closed	Normal		General		invalid		
