[FIX] website: affix menu no close frontend mobile menu
On mobile the frontend menu navbar is an hamburger menu that open on click. If the option "Customize > Main layout | Affix Top Menu" is enabled, there is two menu: - one at the full top of the page - one affixed to the top of the viewport (only shown if we are at least scrolling 300px away from the top of the page) But there is a side effect: when scrolling if the menu at the top of the page is opened, it will be automatically closed => this makes sense to avoid having two menu shown on the same page but is an odd behavior. With this commit, the behavior is changed and when the menu is opened in the top, the affixed menu is not shown (it only works if the top page menu has no opened dropdown). opw-1920310 closes #30564
This commit is contained in:
@@ -60,6 +60,10 @@ sAnimation.registry.affixMenu = sAnimation.Class.extend({
|
||||
* @private
|
||||
*/
|
||||
_onWindowUpdate: function () {
|
||||
if (this.$navbarCollapses.hasClass('show')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wOffset = $(window).scrollTop();
|
||||
var hOffset = this.$target.scrollTop();
|
||||
this.$headerClone.toggleClass('affixed', wOffset > (hOffset + 300));
|
||||
|
||||
Reference in New Issue
Block a user