Problem/Motivation

On my Drupal 9.5 Beta 2 installation, I am trying to clean up the various differences with dropdown functionality on the navs however I have come across one that has me baffled. When in mobile mode I cannot toggle the local tasks menu. I checked out menu-local-tasks.html.twig and it seems to be using claro as a base however it does not work.

Suggestions?

Steps to reproduce

  1. Open a node in mobile mode (Ctrl+Shift+M in Firefox)
  2. Click the arrow to the right of "View" link under title, and see that it doesn't expand

Issue fork bootstrap5-3314380

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Christopher Riley created an issue. See original summary.

Christopher Riley’s picture

It appears that all that is needed to be changed is in the nav-tabs.js

once('nav-tabs', '[data-drupal-nav-tabs].is-collapsible', context).forEach(function (i, value) {

needs to be

$(once('nav-tabs', '[data-drupal-nav-tabs].is-collapsible', context)).each(function (i, value) {

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Active » Needs review

Committed in accordance to the proposed resolution given in #2

ressa’s picture

Version: 2.0.1 » 2.0.x-dev
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new113.27 KB

Thanks for reporting this @Christopher Riley and @immaculatexavier for posting the patch. I can confirm that it fixes the issue:

Local tasks expand on mobile

Just a little request: I initially couldn't understand what the issue was, and it took me a few minutes to understand and replicate the bug. So a simple "Steps to reproduce: 1. Open a node in mobile mode, 2. Click "View" under title, and see that it doesn't expand" would have been helpful.

VladimirAus made their first commit to this issue’s fork.

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

  • VladimirAus committed 9f4e04b on 3.0.x
    Issue #3314380 by immaculatexavier, VladimirAus, ressa, Christopher...

  • VladimirAus committed f990dd3 on 2.0.x
    Issue #3314380 by immaculatexavier, VladimirAus, ressa, Christopher...
vladimiraus’s picture

Updated ES6 files and 3.0.x branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jurriaanroelofs’s picture

Version: 2.0.x-dev » 3.0.x-dev

@VladimirAus unfortunately the fix does not work in 3.0.x
https://www.drupal.org/project/bootstrap5/issues/3320514#comment-14789693

vladimiraus’s picture