diff --git a/core/includes/theme.inc b/core/includes/theme.inc index d8f3136..2047de5 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1528,6 +1528,7 @@ function template_preprocess_region(&$variables) { // Create the $content variable that templates expect. $variables['content'] = $variables['elements']['#children']; $variables['region'] = $variables['elements']['#region']; + $variables['attributes']['data-drupal-region'] = Html::getClass($variables['region']); } /** diff --git a/core/modules/quickedit/js/quickedit.js b/core/modules/quickedit/js/quickedit.js index 274913b..de8baa0 100644 --- a/core/modules/quickedit/js/quickedit.js +++ b/core/modules/quickedit/js/quickedit.js @@ -270,9 +270,10 @@ var entityElement = $(fieldElement).closest(entityElementSelector); // In the case of a full entity view page, the entity title is rendered // outside of "the entity DOM node": it's rendered as the page title. So in - // this case, we must find the entity in the mandatory "content" region. + // this case, we find the main element of the page and use it as a full + // entity ancestor. if (entityElement.length === 0) { - entityElement = $('.region-content').find(entityElementSelector); + entityElement = $('[data-drupal-region="content"]').find(entityElementSelector); } var entityInstanceID = entityElement .get(0) diff --git a/core/modules/system/templates/radios.html.twig b/core/modules/system/templates/radios.html.twig index bf38830..e397644 100644 --- a/core/modules/system/templates/radios.html.twig +++ b/core/modules/system/templates/radios.html.twig @@ -12,4 +12,4 @@ * @ingroup themeable */ #} -{{ children }} +{{ children }} diff --git a/core/modules/system/templates/region.html.twig b/core/modules/system/templates/region.html.twig index b2c5471..e009455 100644 --- a/core/modules/system/templates/region.html.twig +++ b/core/modules/system/templates/region.html.twig @@ -14,14 +14,8 @@ * @ingroup themeable */ #} -{% - set classes = [ - 'region', - 'region-' ~ region|clean_class, - ] -%} {% if content %} - + {{ content }} {% endif %}