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 16088b9..de8baa0 100644 --- a/core/modules/quickedit/js/quickedit.js +++ b/core/modules/quickedit/js/quickedit.js @@ -273,7 +273,7 @@ // this case, we find the main element of the page and use it as a full // entity ancestor. if (entityElement.length === 0) { - entityElement = $('main[role="main"]').find(entityElementSelector); + entityElement = $('[data-drupal-region="content"]').find(entityElementSelector); } var entityInstanceID = entityElement .get(0)