diff --git a/core/modules/settings_tray/js/settings_tray.es6.js b/core/modules/settings_tray/js/settings_tray.es6.js index db492adb94..d2109e2136 100644 --- a/core/modules/settings_tray/js/settings_tray.es6.js +++ b/core/modules/settings_tray/js/settings_tray.es6.js @@ -180,7 +180,6 @@ } } - }); } diff --git a/core/modules/settings_tray/settings_tray.module b/core/modules/settings_tray/settings_tray.module index 3f4aca7c80..04a5cadd32 100644 --- a/core/modules/settings_tray/settings_tray.module +++ b/core/modules/settings_tray/settings_tray.module @@ -122,9 +122,14 @@ function settings_tray_preprocess_block(&$variables) { $variables['attributes']['data-drupal-settingstray'] = 'editable'; } else { + // If the block is overridden then set an attribute which will be used + // in settings_tray.es6.js to remove the "Quick edit" link. + // It not possible to remove the contextual link with + // hook_contextual_links_alter or hook_contextual_links_view_alter + // because they don't get called every time the block will be rendered + // with possibly different configuration overrides. $variables['attributes']['data-settings-tray-overridden'] = TRUE; } - } } }