Index: src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
===================================================================
--- src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js	(revision 35197)
+++ src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js	(working copy)
@@ -3,7 +3,8 @@
 	var toolbar, serializer,
 		each = tinymce.each,
 		trim = tinymce.trim,
-		iOS = tinymce.Env.iOS;
+		iOS = tinymce.Env.iOS,
+		$ = tinymce.$;
 
 	function isPlaceholder( node ) {
 		return !! ( editor.dom.getAttrib( node, 'data-mce-placeholder' ) || editor.dom.getAttrib( node, 'data-mce-object' ) );
@@ -782,15 +783,6 @@
 			}
 		});
 
-		dom.bind( editor.getDoc(), 'dragstart', function( event ) {
-			var node = editor.selection.getNode();
-
-			// Prevent dragging images out of the caption elements
-			if ( node.nodeName === 'IMG' && dom.getParent( node, '.wp-caption' ) ) {
-				event.preventDefault();
-			}
-		});
-
 		// Prevent IE11 from making dl.wp-caption resizable
 		if ( tinymce.Env.ie && tinymce.Env.ie > 10 ) {
 			// The 'mscontrolselect' event is supported only in IE11+
@@ -964,6 +956,34 @@
 		}
 	});
 
+	( function() {
+		var wrap;
+
+		editor.on( 'dragstart', function() {
+			var node = editor.selection.getNode();
+
+			if ( node.nodeName === 'IMG' ) {
+				wrap = editor.dom.getParent( node, '.mceTemp' );
+			}
+		} );
+
+		editor.on( 'drop', function( event ) {
+			var rng;
+
+			if ( wrap && ( rng = tinymce.dom.RangeUtils.getCaretRangeFromPoint( event.clientX, event.clientY, editor.getDoc() ) ) ) {
+				event.preventDefault();
+
+				editor.undoManager.transact( function() {
+					editor.selection.setRng( rng );
+					editor.selection.setNode( wrap );
+					editor.dom.remove( wrap );
+				} );
+			}
+
+			wrap = null;
+		} );
+	} )();
+
 	// Add to editor.wp
 	editor.wp = editor.wp || {};
 	editor.wp.isPlaceholder = isPlaceholder;
