When the following criteria are met, the content will overflow the page and a horizontal scrollbar will be visible

1. Secondary menu is removed
2. Search block is removed.
3. Last primary parent menu item has children.
4. Viewport width is between 1200px and 1480px(ish)


Comments

viappidu created an issue. See original summary.

mherchel’s picture

Status: Active » Closed (cannot reproduce)
StatusFileSize
new172.79 KB

The images that you attached just show the site-branding area of the theme. I can't see the problem.

I tried to reproduce the problem by disabling the secondary navigation and also only having one nav item (with drop down items), and it looks good. Screen shot is attached.

Closing as "cannot reproduce". Feel free to re-open this, but if you do, please update the summary to include better steps to reproduce, and better screenshots.

viappidu’s picture

Status: Closed (cannot reproduce) » Active
StatusFileSize
new132.49 KB

It seems that if there is no secondary navigation menu

It seems that if there is *NO* secondary navigation menu

Are you sure you removed the search block from secondary menu?

mherchel’s picture

Issue summary: View changes
StatusFileSize
new149.99 KB

OK. I figured this out. This only happens when the following criteria are met

1. Secondary menu is removed
2. Search block is removed.
3. Last primary parent menu item has children.
4. Viewport width is between 1200px and 1480px(ish)

The issue is that since the last menu item has children, the children are set to visibility: hidden, which still creates the layout space.

mherchel’s picture

Title: Width of main navigation exceeding vw » Under certain circumstances the primary navigation can create horizontal scrollbar
Version: 9.1.x-dev » 9.2.x-dev
Issue summary: View changes
Priority: Normal » Minor
mherchel’s picture

Issue summary: View changes
viappidu’s picture

Status: Active » Needs review
StatusFileSize
new1.33 KB

Thanks!
I knew you could pick it much faster than me :)

I solved with patch and I cannot see any particular problem or side effect though, again, I'm relying on better eyes...

viappidu’s picture

MY BAD!
Realized with previous patch the secondary menu is badly offset!

viappidu’s picture

StatusFileSize
new1.98 KB

Not sure is the best/right solution though in this way the problem is gone

henry.odiete’s picture

StatusFileSize
new1.05 KB

addded width 250px on active element and removed transition on opacity

komalk’s picture

StatusFileSize
new2.1 KB
new1.4 KB

#10 - Not included the compiled CSS file of core/themes/olivero/css/components/navigation/nav-primary-wide.pcss.css and also having the CSS lint issue.
Worked on #10.

djsagar’s picture

StatusFileSize
new291.45 KB
new1.85 MB

HI,

Issue is still same after applied patch and issue is not only 1200px, Jerking issue shows 1440px also.

For more info please check the video.

Thanks!

djsagar’s picture

Status: Needs review » Needs work
djsagar’s picture

Status: Needs work » Needs review
StatusFileSize
new262.28 KB
new264.65 KB
new27.82 MB
new1.26 KB
new2.76 KB

Hi,

I made some modification in css file for resolving this issue only.
For verification check the video and screen-short which i uploaded.
Please review the changes and gave feedback.

Thanks!

ravi.shankar’s picture

Status: Needs review » Needs work

NW as patch #14 is not green.

djsagar’s picture

Status: Needs work » Needs review
StatusFileSize
new2.48 KB
new2.98 KB

Here, rolling up new patch

hinal05’s picture

StatusFileSize
new234.9 KB
new233.05 KB

Applied patch #16. Please see the attachment. I have checked in mac chrome, firefox and edge and after applied patch horizontal scrollbar not visible. RTBC +1

abhijith s’s picture

StatusFileSize
new2.95 MB
new7.09 MB

Applied patch #16 and it works fine.The horizontal scrollbar is removed after applying the patch.Screen recordings included.

RTBC +1

imalabya’s picture

Status: Needs review » Needs work
StatusFileSize
new52.95 KB

The patch resolves the issue meticulously for the breakpoints but the dropdown differs from the original design when the conditions in the IS are not met as well, like even with search block and secondary menu present the dropdown shifts positions. Also, the dropdown position shifts for larger screens as well.

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.

kiran.kadam911’s picture

mherchel’s picture

To me, its extremely edge case, with a lot of downsides if we don’t do it properly.

Whatever solution we implement should not affect the design and placement of the dropdown unless all of the edge case conditions are met.

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.

gauravvvv’s picture

StatusFileSize
new311.19 KB

I can confirm this is still happening on d10. Attached screenshot for reference.

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new176.06 KB
new3.24 KB

Addressed the issues of comment #19. I have attached a patch for d10. Adding screenshot for reference. Please review

Bushra Shaikh’s picture

StatusFileSize
new87.32 KB

I have verified patch #27 on Drupal 10.1.x version but applied successfully but the issue is not fixed.
I can still see the issue after applying the patch.
refer to the screenshot:

Need work

smustgrave’s picture

Status: Needs review » Needs work

Per #28

dsandhya’s picture

StatusFileSize
new79.97 KB
new80 KB
new548 bytes

This issue is fixed for desktop resolution for the version
10.1.x-dev and its working fine for me please verify

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.

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.