]> _ Git - fluidbook-html5.git/commitdiff
wait #5435 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 6 Sep 2022 13:52:54 +0000 (15:52 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 6 Sep 2022 13:52:54 +0000 (15:52 +0200)
js/libs/fluidbook/fluidbook.nav.js

index 1b1d18434474a02586486ca01f9d659d81f8562e..9eac6ff4cd6d4e2f5411bb14430d4dc825d20b70 100644 (file)
@@ -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