New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Main menu visible on mobile devices during page load #2536
Comments
Great work! The problem is gone. |
@jozwkat Glad to hear that :-) |
@thexmanxyz This is something I remember being discussed quite a long time ago, Feb. 2016! It goes to show how long I've been around the Gantry 5 project, LOL! However, it was @JoomFX that first brought this to the attention of @w00fz a month prior to that conversation here 1️⃣ January 8, 2016 12:14 AM I remember all this because I had saved a solution for it from the discussion back then. @include breakpoint(mobile-only) {
.g-main-nav {
display:none;
}
} or this option which was ultimately dependent on a @include breakpoint(mobile-only) {
body .g-main-nav {
display:none;
}
}
The conversation finishes here with @w00fz 👍 February 18, 2016 1:40 AM saying it is a "perfectly fine solution" EDIT I failed to mention previously that @w00fz also suggested that it would be fine to simply add the built-in Gantry 5 class
|
@N8Solutions @jozwkat That might be an even better solution that should also be directly integrated into Gantry. I had in my mind that my solution proposed above does not consider Thanks for adding further information to the issue. |
@thexmanxyz & @jozwkat I edited my reply after I read through the older comments further. The no-js option was never added to the framework. The reason why is explained by @w00fz here ✔️ February 18, 2016 1:39 AM EDIT I failed to mention previously that @w00fz also suggested that it would be fine to simply add the built-in Gantry 5 class
|
@N8Solutions I thought about an approach to the problem and I ended up with the idea to let the user decide whether he wants take the risk of "no JS support" or prevent flickering. Hence I added a new field to the menu particle which adds a CSS class that disables the menu completely on mobile devices. I will link the respective PR in a bit. |
@N8Solutions Referencing back to #2538 please review for more information on my suggested fix. |
Merged. |
The change was working only in WP, added to other platforms as well. |
@mahagr You are right I overlooked the |
@w00fz also suggested that it would be fine to simply add the built-in Gantry 5 class
|
@N8Solutions The PR #2538 was implemented and AFAIK it is also available on all platforms. It is visible for me on Joomla on all my Gantry 5 installs. Please check #2538 for more information where this settings can be found. Also issue #2574 is about this topic and there are also some screenshots attached showing where this option is located. |
Hey there,
IDK if this one has already been reported but after @jozwkat pointed out in the Gitter chat room I also remembered that I faced the same issue on my sites and actually never reported it. But I will now finally state the issue.
On mobile devices (e.g. hamburger menu is active and replacing main menu) there might be a short period of time during page load when the actual desktop main menu is rendered before it disappears. If I am remembering right I had that issue on Hydrogen, Helium and AFAIK also on Photon. I'm only certain that it happened on Chrome Android but I think it also happens on desktop browsers when enable device testing or shrinking window. It might also has something todo with rendering speed of the machine.
I also have fixed the issue with the following CSS rules:
This might not be the perfect solution but it gives an approach of solving the problem.
.g-block-mm
might not be necessary but I included it anyway. See the screenshot where this custom class was added.The text was updated successfully, but these errors were encountered: