Selaa lähdekoodia

Fix scrolling to top when side menu opens

Denis K 9 vuotta sitten
vanhempi
commit
5df7a2f542
2 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  1. 2 2
      jet/static/jet/css/_sidebar.scss
  2. 0 1
      jet/static/jet/js/main.js

+ 2 - 2
jet/static/jet/css/_sidebar.scss

@@ -212,12 +212,12 @@
     &-container {
     &-container {
       display: none;
       display: none;
       background-color: transparentize($sidebar-popup-overlay-color, 0.5);
       background-color: transparentize($sidebar-popup-overlay-color, 0.5);
-      position: absolute;
+      position: fixed;
       top: 0;
       top: 0;
       left: $sidebar-width;
       left: $sidebar-width;
       bottom: 0;
       bottom: 0;
       right: 0;
       right: 0;
-      z-index: 2;
+      z-index: 3;
     }
     }
 
 
     &-item {
     &-item {

+ 0 - 1
jet/static/jet/js/main.js

@@ -124,7 +124,6 @@
                     resetCurrentPopupItemListItems();
                     resetCurrentPopupItemListItems();
 
 
                     $search.val('').trigger('change').focus();
                     $search.val('').trigger('change').focus();
-                    $(window).scrollTop(0);
                 };
                 };
 
 
                 var hidePopup = function () {
                 var hidePopup = function () {