Browse Source

Update app.js

Fix bug with treeview menu when sidebar is collapsed and you clicked to menu which already visible.
Alexandr 10 năm trước cách đây
mục cha
commit
f2b7e0eecc
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      dist/js/app.js

+ 1 - 1
dist/js/app.js

@@ -394,7 +394,7 @@ function _init() {
       var checkElement = $this.next();
       var checkElement = $this.next();
 
 
       //Check if the next element is a menu and is visible
       //Check if the next element is a menu and is visible
-      if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {
+      if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
         //Close the menu
         //Close the menu
         checkElement.slideUp(animationSpeed, function () {
         checkElement.slideUp(animationSpeed, function () {
           checkElement.removeClass('menu-open');
           checkElement.removeClass('menu-open');