diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index bab2af5..08464ab 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1845,6 +1845,24 @@ function theme_dropbutton_wrapper($variables) {
}
/**
+ * Returns HTML for wrapping a dropbutton list.
+ *
+ * Use this function if the dropbutton contains submit buttons. These elements
+ * need to have a #prefix and #suffix element that wraps those into an
+ * element.
+ *
+ * @param array $variables
+ * An associative array containing:
+ * - element: An associative array containing the properties and children of
+ * the dropbutton list. Properties used: #children.
+ */
+function theme_dropbutton_list_wrapper($variables) {
+ if (!empty($variables['element']['#children'])) {
+ return '';
+ }
+}
+
+/**
* Returns HTML for an image.
*
* @param $variables
@@ -3155,6 +3173,9 @@ function drupal_common_theme() {
'dropbutton_wrapper' => array(
'render element' => 'element',
),
+ 'dropbutton_list_wrapper' => array(
+ 'render element' => 'element',
+ ),
'image' => array(
// HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft
// allows the alt attribute to be omitted in some cases. Therefore,
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index be94ede..11dcb3e 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -246,6 +246,9 @@ protected function actionsElement(array $form, array &$form_state) {
$element = parent::actionsElement($form, $form_state);
$node = $this->getEntity($form_state);
+ // Because some of the 'links' are actually submit buttons, we have to
+ // manually wrap each item in and the whole list in . The
+ // is added with a theme_wrapper function.
$element['operations'] = array(
'#type' => 'operations',
'#subtype' => 'node',
@@ -257,11 +260,10 @@ protected function actionsElement(array $form, array &$form_state) {
),
);
- // Because some of the 'links' are actually submit buttons, we have to
- // manually wrap each item in - and the whole list in
.
- $element['operations']['prefix']['#markup'] = '';
unset($element['submit']);