From: Vincent Vanwaelscappel Date: Mon, 12 May 2025 16:03:38 +0000 (+0200) Subject: wip #7461 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7d73d06415e31896f9312437ee94a6e3bbbb2017;p=fluidbook-html5.git wip #7461 @0.25 --- diff --git a/js/libs/fluidbook/fluidbook.burger.js b/js/libs/fluidbook/fluidbook.burger.js index 5b00db45..7ba839e4 100644 --- a/js/libs/fluidbook/fluidbook.burger.js +++ b/js/libs/fluidbook/fluidbook.burger.js @@ -72,7 +72,7 @@ FluidbookBurger.prototype = { $('#main header').append(menuOpener); // Add holder list element for menu items - $("#menu").append(''); + $("#menu").append(''); // Add Search form var searchElement = (this.fluidbook.settings.search) ? this.getSearch() : ''; @@ -190,6 +190,7 @@ FluidbookBurger.prototype = { $("#menu,#menuOverlay").show(); setTimeout(function () { $("#menu").addClass('open'); + this.fluidbook.resize.resizeMenu(); if (focusClose) { setTimeout(function () { if ($this.fluidbook.input.isUsingKeyboard()) { @@ -205,6 +206,7 @@ FluidbookBurger.prototype = { $("#menuOpener").attr('aria-expanded', 'true'); } this.isOpened = true; + this.fluidbook.resize.resizeMenu(); }, closeAll: function () { @@ -235,11 +237,11 @@ FluidbookBurger.prototype = { }, hideMenuItems: function () { - gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'}); + gsap.to($('#menuList >ul > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'}); }, showMenuItems: function () { - gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'}); + gsap.to($('#menuList >ul> li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'}); }, openSearch: function (q, cb) { diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 337d61ae..f38ccd84 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -577,7 +577,9 @@ FluidbookResize.prototype = { return false; } this.resizeHorizontalNav(); - if (!this.fluidbook.nav.menuIsOpen) return false; + if (!this.fluidbook.nav.burger.isOpened) { + return false; + } var wh = $(window).height(); var formHeight = $('#searchForm').height(); @@ -604,6 +606,7 @@ FluidbookResize.prototype = { // Max-height for the top level of the main menu so it can scroll between the search box and sharing bar $('#menuList > ul').css('maxHeight', mainMenuMaxHeight); + console.log(mainMenuMaxHeight); // Set max-height for search results section (using CSS vh units was unreliable) if (this.fluidbook.search.menuSearchResults !== undefined) { diff --git a/style/burger.less b/style/burger.less index 7896916d..7d7de1b6 100644 --- a/style/burger.less +++ b/style/burger.less @@ -203,7 +203,6 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker { overflow: hidden; position: relative; height: 100%; - padding-top: 81px; &:before { height: 0; // Fix spacing with search box @@ -214,6 +213,10 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker { margin-bottom: 0; padding-top: 20px; padding-bottom: 20px; + + .ps__rail-y { + top: 60px !important; + } } .svg-icon { @@ -282,7 +285,7 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker { padding: 0 70px 0 1em; } - &:focus{ + &:focus { } }