]> _ Git - fluidbook-html5.git/commitdiff
Done #2174 @2
authorStephen Cameron <stephen@cubedesigners.com>
Thu, 2 Aug 2018 13:36:28 +0000 (15:36 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Thu, 2 Aug 2018 13:36:28 +0000 (15:36 +0200)
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.nav.js

index 261e540591888e58e681b6ab0d13dec6ffd66d64..7225536b1237c7c765c0f60de90642dec9810e35 100644 (file)
@@ -86,6 +86,10 @@ FluidbookLinks.prototype = {
             var map = {'pdf': 'print', 'fullScreen': "fullscreen", 'locales': 'localesContainers', 'basket': 'cart'};
             var action = $(this).data('action');
             var extra = $(this).data('extra');
+
+            // Ensure that mobile menu closes if it is open
+            $this.fluidbook.nav.closeMenu();
+
             if (action == 'share') {
                 // Let share class handle this
                 return true;
index c6abc0d3c4f37e83ee35dc0525d658c82300098d..cb8f79b72f066ea857e63fc3ea2304095273b5a5 100644 (file)
@@ -111,6 +111,9 @@ FluidbookNav.prototype = {
             //maxScrollbarLength: 60
         });
     },
+    closeMenu: function () {
+        this.menuAPI.close();
+    },
     // getIcon: function (name) {
     //     var src = 'data/images/' + name + '.';
     //     if (this.fluidbook.support.SVG) {
@@ -710,7 +713,7 @@ FluidbookNav.prototype = {
         });
 
         // Zoom Out icon
-        $(document).on('click', '.icon-zoomout', function () {
+        $(document).on('click', '.icon-zoomout', function (e) {
             $this.fluidbook.desktop.clickZoom(e, 'out');
             return false;
         });