diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
index 3731471..aaae985 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
@@ -91,7 +91,7 @@ public function defaultConfiguration() {
    * Adds body and description fields to the block configuration form.
    */
   public function blockForm($form, &$form_state) {
-    $options = array();
+    $options = array('default' => t('Default'));
     $view_modes = entity_get_view_modes('custom_block');
     foreach ($view_modes as $view_mode => $detail) {
       $options[$view_mode] = $detail['label'];
@@ -113,6 +113,7 @@ public function blockForm($form, &$form_state) {
   public function blockSubmit($form, &$form_state) {
     // Invalidate the block cache to update custom block-based derivatives.
     if ($this->moduleHandler->moduleExists('block')) {
+      $this->configuration['view_mode'] = $form_state['values']['custom_block']['view_mode'];
       $this->blockManager->clearCachedDefinitions();
     }
   }
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php
index ff36e80..6968014 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php
@@ -58,6 +58,13 @@ public function testCustomBlockCreation() {
       '%name' => $edit["info"]
     )), 'Basic block created.');
 
+    // Change view mode to default.
+    $this->drupalPostForm(NULL, array('settings[custom_block][view_mode]' => 'default'), t('Save block'));
+
+    // Check that the view mode has actually changed to default.
+    $this->clickLink($edit['info']);
+    $this->assertFieldByXPath('//select[@name="settings[custom_block][view_mode]"]/option[@selected="selected"]/@value', 'default', 'View mode changed to Default');
+
     // Check that the block exists in the database.
     $blocks = entity_load_multiple_by_properties('custom_block', array('info' => $edit['info']));
     $block = reset($blocks);
