From b4601fb74f965bbdf22cb4e4604c7eae9054feb2 Mon Sep 17 00:00:00 2001 From: cigamit Date: Sat, 12 Mar 2016 08:16:43 -0600 Subject: [PATCH] adjust for chrome bug with relative links --- include/themes/dark/main.js | 3 ++- include/themes/modern/main.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/themes/dark/main.js b/include/themes/dark/main.js index 48c9b8f5b..57ce5c281 100644 --- a/include/themes/dark/main.js +++ b/include/themes/dark/main.js @@ -237,8 +237,9 @@ function setMenuVisibility() { }); // Functon to give life to the Navigation pane - $('#nav li:has(ul) a.active').unbind().click(function() { + $('#nav li:has(ul) a.active').unbind().click(function(event) { event.preventDefault(); + if ($(this).next().is(':visible')){ $(this).next().slideUp( { duration: 200, easing: 'swing' } ); storage.set($(this).text(), 'collapsed'); diff --git a/include/themes/modern/main.js b/include/themes/modern/main.js index 4143974dc..5e32f8ec6 100644 --- a/include/themes/modern/main.js +++ b/include/themes/modern/main.js @@ -227,8 +227,9 @@ function setMenuVisibility() { }); // Functon to give life to the Navigation pane - $('#nav li:has(ul) a.active').unbind().click(function() { + $('#nav li:has(ul) a.active').unbind().click(function(event) { event.preventDefault(); + if ($(this).next().is(':visible')){ $(this).next().slideUp( { duration: 200, easing: 'swing' } ); storage.set($(this).text(), 'collapsed');