Forum Replies Created
July 4, 2020 at 10:47 pm in reply to: Mobile Menu CLS (Cumulative Layout Shift) Issue with Digital Pro #499959
Any update on this? Anyone like @braddalton have any fixes? I would really appreciate the help.July 4, 2020 at 9:34 am in reply to: Mobile Menu CLS (Cumulative Layout Shift) Issue with Digital Pro #499945
You can use any mobile device (under 800px as per the theme code for displaying the hamburger menu) or the chrome developer tools to see the problem. Sometimes, you might wanna load the uncached version (Ctrl+Shift+R) to see the flash, as the servers of Studiopress are pretty fast which is not the case for all the sites.July 4, 2020 at 8:15 am in reply to: Mobile Menu CLS (Cumulative Layout Shift) Issue with Digital Pro #499933
According to me, it is something in its core framework, not child theme specific as I mentioned. Even the framework demo has the same issue of showing the menu for a few milliseconds before it disappears. It seems like the display: none, display: block property dynamically applied to the navigation menu using JS isn't designed to avoid CLS. The display: none property is missing in the navigation menu HTML element by default waiting for the CSS elements to be loaded that contains the required classes.
As I said, it is just a guess. I think if we can prepend the display: none property right into the HTML Nav element without waiting for the button to be touched, the issue could be resolved. Is there any workaround for this?
Also, this is not just for the sake of search engines, but also from a user perspective, the design seems pretty lazy when an unwanted menu item is shown disappearing all of a sudden which shouldn't be shown until the menu toggle is touched.