This bug appears on devices with widths less than 610px and scroll down.

The menu should stay fixed at the top as shown in this image:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rafavermo created an issue. See original summary.

cilefen’s picture

This was opened in the Seven theme component but, at a glance, there seems not to be a connection to Seven as such.

maxocub’s picture

Component: Seven theme » toolbar.module
Issue tags: -Seven theme

I think this is coming from the toolbar module. It's there that the class 'toolbar-fixed' is set on the body when the display is greater than 610px, and not when it's smaller.

maxocub’s picture

Status: Active » Needs review
FileSize
1.3 KB

I found this fix, which keeps the toolbar fixed when the tray is open, but stays absolute when the tray is close. I don't know if that's the desired behavior.

riddhi.addweb’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @maxocub for the patch it works well for me.

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs usability review

I would like to have usability review on this change

yoroy’s picture

Status: Needs review » Needs work
Issue tags: -Needs usability review +Usability

I suspect we did this to not occupy valuable screenspace on small view ports, but it amounts to weird behaviour. Keeping the toolbar in view is good because modules like settings tray and place block add global toggles there which should indeed stay accessible at all times.

I tested this on simplytest. The toolbar does stay in view now, but only when the bottom navigation bar is expanded. When I collapse the navigation bar and then scroll, the black part of the toolbar still scrolls out of view. So I think this needs work to make the toolbar stay in view when the navigation bar is collapsed as well.

maxocub’s picture

Status: Needs work » Needs review
FileSize
1.3 KB
1.3 KB

Now the toolbar also stays in view when the navigation bar is collapsed.

maxocub’s picture

FileSize
339.26 KB

Here's an animated screen shot.

maxocub’s picture

FileSize
339.26 KB

Oups, that was the previous screen shot, here's the new one.

mahalingam_cs’s picture

Status: Needs review » Needs work

Applied patch and the test failed. The toolbar disappears when the menu is opened.

tameeshb’s picture

Status: Needs work » Needs review
FileSize
966 bytes

Fresh patch from scratch.
This patch should fix it
Please Review! :)

Vj’s picture

Status: Needs review » Reviewed & tested by the community

Applied #12 patch on 8.4.x. Worked for me.

Tried #4 patch too, as @mahalingam_cs pointed its goes back to top from middle of the page and bit annoying for end user.

sahilsharma011’s picture

FileSize
24.75 KB
26.38 KB

I applied #12 patch and it did not work for me. For screen sizes smaller than 610px. My drupal version is 8.4.x

sahilsharma011’s picture

Status: Reviewed & tested by the community » Needs work
sudhanshug’s picture

Status: Needs work » Reviewed & tested by the community

@sahilsharma011, you'll have to clear caches by going to Configuration > Performance > Click 'clear all caches' button. Doing this will clear the cached CSS files and you could see the changes.

sahilsharma011’s picture

Yes it is working now. I didn't knew that. Thanks @sudhanshug

tameeshb’s picture

Alternative :
in Drupal root,
drush cc

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 12: 2864051-12.patch, failed testing.

maxocub’s picture

Status: Needs work » Reviewed & tested by the community

CI Error, back to RTBC.

lauriii’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Thanks @idebr for pointing out the other issues.

I will close this issue as a duplicate to #2516938: Set the toolbar to position fixed on mobile since it contains a lot of background information about why the bug haven't been fixed yet.

tameeshb’s picture

This one is already an RTBC though, the other one is pretty old and there haven't been any updates there since a year.