﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13468	[IE] Binding drag and drop dataTransfer does not work if text data was set in the meantime.	Piotr Jasiun	Piotr Jasiun	"Check this code: http://jsfiddle.net/oqzy8dog/3/ 

It does not work on IE, because the only way to store data transfer ID is to use `text` data type. Since we do not want to change this text we simple do not use generated  ID and the ID is the content on the `Text` data or an empty string (this is just a backup solution, because if `dataTransfer` is reset on `dragend` we can simple use the same `dataTransfer` object until it is reset, without comparing ID):

{{{
this.id = this.getData( clipboardIdDataType );

// If there is no ID we need to create it. Different browsers needs different ID.
if ( !this.id )
	if ( clipboardIdDataType == 'Text' ) // IE
		this.id = '';
}}}

In this case `this.id` is an empty string, because it was not set when the `dataTransfer` constructor was called. Then we set the `text` and when we set up the `dataTransfer` object for the second time (on drop) the `id` became this data.

So then we compare IDs in `initDragDataTransfer`: 

{{{
if ( this.dragData && dataTransfer.id == this.dragData.id )
}}}

they do not match and new object is created, so custom data we set on `dragstart` will not be available on `drop`.

There are two solutions.

== Solution A: do not use ID ==

We could consider not using ID at all on IE so the change would be:

{{{
if( clipboardIdDataType != 'Text' ) {
	this.id = this.getData( clipboardIdDataType );	
}
}}}

but then all external drops will have the same `DataTransfer` object if user forget to reset it manually on `dragend`.

== Solution B: update ID ==

Alternatively we could update ID every time user set the `text` data. This seems to be a little weird, but can work a little better."	Bug	closed	Must have (possibly next milestone)	CKEditor 4.5.2	General	4.5.0 Beta	fixed		
