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
- Open a node in mobile mode (Ctrl+Shift+M in Firefox)
- Click the arrow to the right of "View" link under title, and see that it doesn't expand
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Local-Tasks-show-on-mobile-3314380-6-Peek-2022-10-10 12-45.gif | 113.27 KB | ressa |
Issue fork bootstrap5-3314380
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
Comment #2
Christopher Riley commentedIt 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) {
Comment #5
immaculatexavier commentedCommitted in accordance to the proposed resolution given in #2
Comment #6
ressaThanks for reporting this @Christopher Riley and @immaculatexavier for posting the patch. I can confirm that it fixes the issue:
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.
Comment #8
vladimirausComment #11
vladimirausUpdated ES6 files and 3.0.x branch.
Comment #13
jurriaanroelofs commented@VladimirAus unfortunately the fix does not work in 3.0.x
https://www.drupal.org/project/bootstrap5/issues/3320514#comment-14789693
Comment #14
vladimiraus@JurriaanRoelofs see #3328392: [Drupal 10] Uncaught ReferenceError: $once is not defined