Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | boxes-closest_contextual-2269603-1.patch | 730 bytes | xaqrox |
blocks.js_.patch | 906 bytes | eltermann | |
Comments
Comment #1
xaqroxI 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'sclosest()
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!