From b82b8c932d42d7ddc9267b2c9cd1a35be0d03305 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 6 Sep 2022 15:52:54 +0200 Subject: [PATCH] wait #5435 @0.75 --- js/libs/fluidbook/fluidbook.nav.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.nav.js b/js/libs/fluidbook/fluidbook.nav.js index 1b1d1843..9eac6ff4 100644 --- a/js/libs/fluidbook/fluidbook.nav.js +++ b/js/libs/fluidbook/fluidbook.nav.js @@ -124,8 +124,7 @@ FluidbookNav.prototype = { $('#menuList > ul, #chapterList').perfectScrollbar({ suppressScrollX: true, minScrollbarLength: 40, //maxScrollbarLength: 60 }); - }, - closeMenu: function () { + }, closeMenu: function () { this.menuAPI.close(); }, // getIcon: function (name) { // var src = 'data/images/' + name + '.'; @@ -782,7 +781,9 @@ FluidbookNav.prototype = { if (q !== undefined) { $("#q").val(q); - this.fluidbook.search.submitForm(); + if ($("#menuSearchResults .content").length === 0) { + this.fluidbook.search.submitForm(); + } } else { this.menuAPI.open(); $('#q').focus(); // Put cursor in the search field -- 2.39.5