Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296542

Layout builder - contextual links

$
0
0

Problem/Motivation

After inserting EBT block via layout builder, contextual buttons for edit/delete.. missing.

Steps to reproduce

Install some EBT modules:
https://www.drupal.org/project/ebt_core
https://www.drupal.org/project/ebt_basic_button

Proposed resolution

Change code in layout-builder.js that is resposible for hiding everything in block that isn't contextual link related.

/* $element.children(':not([data-contextual-id])').hide(0); */

// update:
const contextual_lookup = $element.children().find('[data-contextual-id]');
const has_child_contain_contextual = !!(contextual_lookup.length);
if (has_child_contain_contextual == true) {
contextual_lookup.siblings().hide();
contextual_lookup.parent().siblings().hide();
} else {
$element.children(':not([data-contextual-id])').hide(0);
}


Viewing all articles
Browse latest Browse all 296542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>