diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php
index 5e369d5..2a482f4 100644
--- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php
+++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php
@@ -395,7 +395,7 @@ protected function submitOverviewForm(array $complete_form, array &$form_state)
     $form = array_intersect_key(array_merge($order, $form), $form);
 
     $updated_items = array();
-    $fields = array('weight', 'plid');
+    $fields = array('plid', 'weight');
     foreach (element_children($form) as $mlid) {
       if (isset($form[$mlid]['#item'])) {
         $element = $form[$mlid];
@@ -403,6 +403,16 @@ protected function submitOverviewForm(array $complete_form, array &$form_state)
         foreach ($fields as $field) {
           if ($element[$field]['#value'] != $element[$field]['#default_value']) {
             $element['#item'][$field] = $element[$field]['#value'];
+            // If the parent item itself has changed, make sure the original
+            // parent item will be saved before the child item. This prevents
+            // any changes to be overwritten by the original values of the
+            // parent item.
+            if ($field == 'plid') {
+              $original_plid = "mlid:{$element['plid']['#default_value']}";
+              if (!array_key_exists($original_plid, $updated_items) && array_key_exists($original_plid, $form)) {
+                $updated_items[$original_plid] = $form[$original_plid]['#item'];
+              }
+            }
             $updated_items[$mlid] = $element['#item'];
           }
         }
diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
index a170185..6d67128 100644
--- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
+++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\menu\Tests;
 
+use Drupal\Component\Utility\String;
+
 /**
  * Defines a test class for testing menu and menu link functionality.
  */
@@ -367,6 +369,49 @@ function doMenuTests() {
       'langcode' => 'en',
     ));
 
+    // Check if menu items are correctly saved if a child item is moved to
+    // another parent using the drag-and-drop interface.
+    // "Drag" item3 from its original parent item2 to the new parent item5 by
+    // reordering them in the DOM.
+    $htmlDom = new \DOMDocument();
+    @$htmlDom->loadHTML('<?xml encoding="UTF-8">' . $this->drupalGetContent());
+    $xpath = new \DOMXPath($htmlDom);
+    $item3_tablerow = $xpath->query(String::format('//table[@id="menu-overview"]/descendant::input[@name="links[mlid:@mlid][mlid]"]/ancestor::tr', array('@mlid' => $item3['mlid'])))->item(0);
+    $item5_tablerow = $xpath->query(String::format('//table[@id="menu-overview"]/descendant::input[@name="links[mlid:@mlid][mlid]"]/ancestor::tr', array('@mlid' => $item5['mlid'])))->item(0);
+    $item5_tablerow->appendChild($item3_tablerow);
+    $this->drupalSetContent($htmlDom->saveHTML());
+
+    // Set item5 as the new parent of item3, mimick tabledrag.js by assigning
+    // weights starting from -50, and submit the form.
+    $edit = array(
+      'links[mlid:' . $item3['mlid'] . '][plid]' => $item5['mlid'],
+      'links[mlid:' . $item3['mlid'] . '][weight]' => -50,
+      'links[mlid:' . $item2['mlid'] . '][weight]' => -49,
+    );
+    $this->drupalPostForm(NULL, $edit, t('Save'));
+
+    // Check if the links are correctly updated.
+    $this->assertMenuLink($item2['mlid'], array(
+      'depth' => 3,
+      'has_children' => 0,
+      'p1' => $item4['mlid'],
+      'p2' => $item5['mlid'],
+      'p3' => $item2['mlid'],
+      'p4' => 0,
+      'langcode' => 'en',
+      'weight' => -49,
+    ));
+    $this->assertMenuLink($item3['mlid'], array(
+      'depth' => 3,
+      'has_children' => 0,
+      'p1' => $item4['mlid'],
+      'p2' => $item5['mlid'],
+      'p3' => $item3['mlid'],
+      'p4' => 0,
+      'langcode' => 'en',
+      'weight' => -50,
+    ));
+
     // Add 102 menu links with increasing weights, then make sure the last-added
     // item's weight doesn't get changed because of the old hardcoded delta=50.
     $items = array();
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
index 0e95f42..32f3f01 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
@@ -248,6 +248,7 @@ public function updateParentalStatus(EntityInterface $entity, $exclude = FALSE)
         ->fields(array('has_children' => $parent_has_children))
         ->condition('mlid', $entity->plid)
         ->execute();
+      $this->resetCache(array($entity->plid));
     }
   }
 
