JS calls all links inside tabs, which makes it harder to add to the item_list

Created on 27 May 2022, over 2 years ago
Updated 30 August 2024, 5 months ago

Problem/Motivation

Trying to add an element in the same row as tabs and the link is blocked.

Steps to reproduce

If you add an element to the list ex:

function HOOK_preprocess_item_list__quicktabs__TABNAME(&$variables) {
  $variables['items'][] = ['value' =>  [
    '#type' => 'container',
    'somelink' => \Drupal\Core\Link::createFromRoute('Front', '<front>')->toRenderable(),
  ]];
}

You get a link on the end of tabs but can't click it.

Proposed resolution

This patch literally just adds ">" to make it single level so you can simply put a 'container' around any link you want to work.
$ul.find('li > a').each(function(i, element){

✨ Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States devitate Orange County, CA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024