On a very small resolution (below 16.5em) when navigation toolbar collapses to one row with icons and labels - it's impossible to go through some top menu items.

To reproduce: click on 'Manage' menu item so that it is expanded. Then you can see parent toolbar menu items overlap inner 'Manage' elements. And actually all overlapped elements are not clickable so you can't go to e.g. 'Content'.

In the image "Navigation menu - overlapped.png" with red rectangle you can see overlapped elements that are not clickable.

Comments

sosevich.v created an issue. See original summary.

alexandra.vecher’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new8.45 KB
berdir’s picture

Status: Patch (to be ported) » Needs work

Something with the patch doesn't seem right, it looks like the whole file is being added?

Note that the correct status is "Needs review* wheny upload a patch.

alexandra.vecher’s picture

StatusFileSize
new572 bytes
echo15’s picture

Status: Needs work » Needs review
echo15’s picture

Patch in comment #4 works fine!

echo15’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: navigation_toolbar_3036975_4.patch, failed testing. View results

rodman1980’s picture

Issue tags: -epam-contrib-2019.03
alexandra.vecher’s picture

StatusFileSize
new853 bytes
sosevich.v’s picture

Status: Needs work » Reviewed & tested by the community

This new patch works for me. Also this patch applies correctly in composer.json

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 0001-navigation_toolbar_3036975_10.patch, failed testing. View results

huzooka’s picture

Assigned: Unassigned » huzooka
huzooka’s picture

Assigned: huzooka » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.07 KB
new1.11 KB

A bit different approach here — it will pass tests and applies the needed change for the core css in toolbar module. (Patch comes from #3037284: Toolbar tray items are unclickable on really small viewport (below 16.5em), it's a dup of this issue.)

mchameddie’s picture

Title: Navigation toolbar works incorrectly on a small resolution (below 16.5em) » Multiline Admin Toolbar overlaps with horizontal & vertical menus and Page Title area
Version: 8.6.x-dev » 8.8.x-dev
Component: contextual.module » toolbar.module
Status: Needs review » Needs work
StatusFileSize
new88.65 KB
new87.49 KB
new284.81 KB

I also encountered this issue recently. After much experimenting and debugging, I found the issue to be quite larger than just the vertical menu's z-index. The horizontal menu and page title areas are also affected. The behaviors also occur after adding more buttons to the Admin Toolbar area, even in larger viewport sizes. I've attached screen captures to illustrate.

Applying the patch from Comment #14 to a fresh Drupal 8 install did not resolve the issue.

The source of these behaviors is the dynamic height of the Admin Toolbar area. As more buttons are added to the Toolbar menu, it takes up more than one line and the entire area grows taller. This causes the original z-index issue (for both vertical and horizontal menus). A taller Toolbar Admin area also obscures more and more of the Page Title area.

So for horizontal and vertical menus as well as the main page area itself, the CSS 'top' property needs to dynamically adjust so that these elements always begin at the bottom of the Admin Toolbar area. I have a patch which I'll post in my next comment.

Lastly, this is my very first time to contribute to a Drupal community discussion. Please accept my apologies in advance if I've not quite gotten the process down just yet.

mchameddie’s picture

Status: Needs work » Needs review
StatusFileSize
new2.36 KB

This is a small jQuery block appended to toolbar.js that addresses the behavior described in Comment #15.

To replicate the issue:

  1. Create a fresh Drupal install.
  2. Install the Toolbar Menu module.
  3. Add as many new Toolbar buttons as needed to force your Toolbar to take up 2 or more lines.
  4. Refresh your site page and observe the horizontal and vertical toolbars. They will likely overlap with the button text on the second, third lines, etc.
  5. Also, the Page Title area may be partially obscured by the Toolbar area. (Your site's logo will be the most obvious indicator of this behavior.)

To test the patch:

  1. Apply the patch from Comment #16.
  2. Refresh your site page and test the horizontal and vertical toolbars. They should always appear at the bottom of the Toolbar area, and no menu items should overlap with any Toolbar button text.
  3. Also verify that your Page Title area begins at the bottom of the Toolbar area. Your site's logo should be fully visible.
  4. Also verify the fix still works when rotating your page on a mobile device or tablet, or by clicking other Toolbar buttons that expose different menus.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mchameddie’s picture

StatusFileSize
new58.2 KB
new2.38 KB

Changed Line 209 of toolbar.js from:

toolbarPopupMenu = $('.toolbar-tray'),

to:

toolbarPopupMenu = $('.toolbar-tray, .block-demo-backlink'),

to also force-top-align the "Exit block region demonstration" link at the bottom of a multi-line admin toolbar.

To view the fix, repeat the Replicate and Patch Test steps listed under Comment #16.

If you find that the toolbars and/or "Exit block region demonstration" links are still a few pixels above or below the bottom edge of the admin toolbar, then modify Line 212 in your local copy of toolbar.js by adding/subtracting the number of pixels necessary from the tBarHeight variable.

msuthars’s picture

Assigned: Unassigned » msuthars
msuthars’s picture

StatusFileSize
new92.08 KB
new187.46 KB
new106.93 KB
new198.57 KB

@Eddie McHam I reviewed the patch #18 with Drupal core 8.9.x and it is working fine. Check screenshots before/after applying the patch.

msuthars’s picture

Status: Needs review » Reviewed & tested by the community
msuthars’s picture

Assigned: msuthars » Unassigned
lauriii’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/toolbar/js/toolbar.js
@@ -172,4 +172,62 @@
-})(jQuery, Drupal, drupalSettings);
...
+})(jQuery, Drupal, drupalSettings);
...
+$ = jQuery.noConflict();
+$(document).ready(function(){

could we add this code to the pre-existing Drupal behaviors?

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

bnjmnm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.92 KB

This isn't building off of any previous patches so there's no interdiff. The offset calculation was based on the height of a single toolbar tab instead of the overall toolbar, which would result in a single-line height regardless of how many lines were present. It looks like this can be taken care of with a small modification to how toolbar is calculating the top padding + a small CSS change.

I opted to not change this for vertical trays at it visually seems to make more sense to have them attached to the top row. The z index is increased so there isn't a conflict with toolbar items underneath it. This can definitely be changed if there's differing opinions on this.

@Eddie McHam that was a clever solution, though! For future issues you'll want to work on the .es6.js file as opposed to the .js ones. More info on this can be found here: https://www.drupal.org/node/2815083

Status: Needs review » Needs work

The last submitted patch, 25: 3036975-25.patch, failed testing. View results

bnjmnm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.54 KB
new3.69 KB

Had to update the StableDecoupled test since a core css file was changed.

huzooka’s picture

#15 changed the scope of this issue :(

Reopening #3037284: Toolbar tray items are unclickable on really small viewport (below 16.5em) since it is not a duplicate anymore.

But please, please, don't change the scope of the issues. The current title talks about a different bug than the original report. (Below 16.5em means e.g. 240 pixels).

huzooka’s picture

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

mchameddie’s picture

StatusFileSize
new36.41 KB

Regarding the patches on comments 25 & 27: I tried applying these to a D8.9.x site, but the toolbar issue behavior persists.

Toolbar issue in 8.9.x with most recent patch

So I will need to continue using the patch I submitted on comment 18. I am aware it does not conform to the ES6 method of JS development, which is very new to me.

Or if someone can please advise how I can get the latest patch to work on 8.9.x, that would be most appreciated.

Thanks, Eddie

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned

Patch #27 not work in drupal 10.1.0 please reroll the patch.
Thank you.

sahil.goyal’s picture

StatusFileSize
new1.28 KB
new4.41 KB

I have been reroll the patch for the version 10.1.x and also attaching the reroll_diff along with the patch.

_utsavsharma’s picture

StatusFileSize
new1.14 KB
new1.34 KB

Fixed CCF for #38.
Please review.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs issue summary update, +Needs tests

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

As a bug this will need a test case

Issue summary should be updated with proposed solution, screenshots, remaining tasks, etc. Recommend using default template

Patch #39 had failures.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

acbramley’s picture

Issue tags: +Bug Smash Initiative

This came up in BSI random triage. #40 still applies.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Postponed

The Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.

Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.

quietone’s picture

Project: Drupal core » Toolbar
Version: main » 1.x-dev
Component: toolbar.module » Code
Status: Postponed » Needs work

Toolbar has moved to contrib