Index: src/wp-admin/admin-ajax.php
===================================================================
--- src/wp-admin/admin-ajax.php	(revision 37571)
+++ src/wp-admin/admin-ajax.php	(working copy)
@@ -63,6 +63,7 @@
 	'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
 	'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
 	'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username',
+	'get-post-thumbnail-html',
 );
 
 // Deprecated
Index: src/wp-admin/includes/ajax-actions.php
===================================================================
--- src/wp-admin/includes/ajax-actions.php	(revision 37571)
+++ src/wp-admin/includes/ajax-actions.php	(working copy)
@@ -2146,6 +2146,28 @@
 }
 
 /**
+ * Ajax handler for retrieving HTML for the featured image.
+ *
+ * @since 4.6.0
+ */
+function wp_ajax_get_post_thumbnail_html() {
+	$post_ID = intval( $_POST['post_id'] );
+	if ( ! current_user_can( 'edit_post', $post_ID ) )
+		wp_die( -1 );
+
+	$thumbnail_id = intval( $_POST['thumbnail_id'] );
+
+	check_ajax_referer( "update-post_$post_ID" );
+
+	if ( -1 === $thumbnail_id ) {
+		$thumbnail_id = null;
+	}
+
+	$return = _wp_post_thumbnail_html( $thumbnail_id, $post_ID );
+	wp_send_json_success( $return );
+}
+
+/**
  * AJAX handler for setting the featured image for an attachment.
  *
  * @since 4.0.0
Index: src/wp-admin/includes/post.php
===================================================================
--- src/wp-admin/includes/post.php	(revision 37571)
+++ src/wp-admin/includes/post.php	(working copy)
@@ -217,6 +217,15 @@
 			_wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) );
 	}
 
+	if ( isset( $post_data['_thumbnail_id'] ) && post_type_supports( $ptype->name, 'thumbnail' ) ) {
+		$thumbnail_id = intval( $post_data['_thumbnail_id'] );
+		if ( -1 === $thumbnail_id ) {
+			delete_post_thumbnail( $post_ID );
+		} else {
+			set_post_thumbnail( $post_ID, $thumbnail_id );
+		}
+	}
+
 	if ( isset($post_data['visibility']) ) {
 		switch ( $post_data['visibility'] ) {
 			case 'public' :
@@ -1421,10 +1430,12 @@
 				$thumbnail_html
 			);
 			$content .= '<p class="hide-if-no-js howto" id="set-post-thumbnail-desc">' . __( 'Click the image to edit or update' ) . '</p>';
-			$content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail(\'' . $ajax_nonce . '\');return false;">' . esc_html( $post_type_object->labels->remove_featured_image ) . '</a></p>';
+			$content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail">' . esc_html( $post_type_object->labels->remove_featured_image ) . '</a></p>';
 		}
 	}
 
+	$content .= '<input type="hidden" name="_thumbnail_id" value="' . esc_attr( $thumbnail_id ? $thumbnail_id : '-1' ) . '" />';
+
 	/**
 	 * Filters the admin post thumbnail HTML markup to return.
 	 *
Index: src/wp-includes/js/media-editor.js
===================================================================
--- src/wp-includes/js/media-editor.js	(revision 37571)
+++ src/wp-includes/js/media-editor.js	(working copy)
@@ -640,7 +640,6 @@
 		 * set the HTML in the post meta box to the new featured image.
 		 *
 		 * @global wp.media.view.settings
-		 * @global wp.media.post
 		 *
 		 * @param {number} id The post ID of the featured image, or -1 to unset it.
 		 */
@@ -649,16 +648,27 @@
 
 			settings.post.featuredImageId = id;
 
-			wp.media.post( 'set-post-thumbnail', {
+			wp.media.post( 'get-post-thumbnail-html', {
 				json:         true,
 				post_id:      settings.post.id,
 				thumbnail_id: settings.post.featuredImageId,
 				_wpnonce:     settings.post.nonce
 			}).done( function( html ) {
+				if ( html == '0' ) {
+					window.alert( window.setPostThumbnailL10n.error );
+					return;
+				}
 				$( '.inside', '#postimagediv' ).html( html );
 			});
 		},
 		/**
+		 * Remove the featured image id, save the post thumbnail data and
+		 * set the HTML in the post meta box to no featured image.
+		 */
+		remove: function() {
+			wp.media.featuredImage.set( -1 );
+		},
+		/**
 		 * The Featured Image workflow
 		 *
 		 * @global wp.media.controller.FeaturedImage
@@ -735,7 +745,8 @@
 
 				wp.media.featuredImage.frame().open();
 			}).on( 'click', '#remove-post-thumbnail', function() {
-				wp.media.view.settings.post.featuredImageId = -1;
+				wp.media.featuredImage.remove();
+				return false;
 			});
 		}
 	};
