When I nest a box in another blocks (for instance on my own custom block), the contextual links of the outer block is being changed by blocks.js.

I don't think this is a desirable behavior.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xaqrox’s picture

I had the exact same problem: I used views_block_area to embed a box in a view that was providing a block display, and this JS was replacing the "Configure block" link for the parent view block as well as the box. I used jQuery's closest() instead of the :first selector which I think provides better readability and precision.

The real solution to this problem is probably going to be in #2448153: Add "Edit Box" Contextual Link more properly, but I didn't have time to mess around with contextual links API, just needed quick access to my view block config!